diff --git a/.github/workflows/check_build.yml b/.github/workflows/check_build.yml index cdb1e755..3ad85785 100644 --- a/.github/workflows/check_build.yml +++ b/.github/workflows/check_build.yml @@ -8,34 +8,25 @@ on: [push, pull_request] jobs: build: - strategy: - matrix: - # Use these Java versions - java: [ - 21, # Minimum - ] - os: [ubuntu-22.04] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-22.04 steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@v1 - - name: Setup JDK ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: gradle/actions/wrapper-validation@v4 + - name: Setup JDK 21 + uses: actions/setup-java@v4 with: distribution: zulu - java-version: ${{ matrix.java }} + java-version: 21 - name: Make Gradle wrapper executable - if: ${{ runner.os != 'Windows' }} run: chmod +x ./gradlew - name: Build run: ./gradlew build --stacktrace --parallel - name: Capture build artifacts - if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from LTS java on one OS - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Artifacts path: build/libs/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7e0893a0..ffaeeff7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,20 +10,14 @@ on: required: true jobs: release: - strategy: - matrix: - # Use these Java versions - java: [21] - # and run on both Linux and Windows - os: [ubuntu-22.04] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-22.04 steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Create version tag - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | github.rest.git.createRef({ @@ -35,14 +29,13 @@ jobs: - name: Fetch tags run: git fetch --tags - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@v1 - - name: Setup JDK ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: gradle/actions/wrapper-validation@v4 + - name: Setup JDK 21 + uses: actions/setup-java@v4 with: distribution: zulu - java-version: ${{ matrix.java }} + java-version: 21 - name: Make Gradle wrapper executable - if: ${{ runner.os != 'Windows' }} run: chmod +x ./gradlew - name: Build run: ./gradlew generateChangelog build publish github modrinth curseforge --stacktrace --parallel -PlastTag="v${{ github.event.inputs.previousVersion }}" -PcurrentTag="v${{ github.event.inputs.version }}" @@ -55,8 +48,7 @@ jobs: MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} DISCORD_ANNOUNCEMENT_WEBHOOK: ${{ secrets.DISCORD_ANNOUNCEMENT_WEBHOOK }} - name: Capture build artifacts - if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from LTS java on one OS - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Artifacts path: build/libs/