diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 1eaf03a..f8e24a1 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -12,17 +12,17 @@ on: jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 with: distribution: 'zulu' - java-version: '17' + java-version: '21' - name: Cache Gradle packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} @@ -31,7 +31,7 @@ jobs: run: chmod +x gradlew - name: Build with Gradle run: ./gradlew build - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: jar path: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a9588d..bf858c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,21 +2,23 @@ name: Release Build on: release: + permissions: + contents: write types: - published jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 with: distribution: 'zulu' - java-version: '17' + java-version: '21' - name: Cache Gradle packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} @@ -34,15 +36,13 @@ jobs: curseforge-id: 431430 curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} - github-token: ${{ secrets.GITHUB_TOKEN }} - name: "" loaders: | neoforge - - name: Upload checksum + - name: Upload jar and checksum to Github release id: upload-release-assets - uses: alexellis/upload-assets@0.4.0 + uses: alexellis/upload-assets@0.4.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - asset_paths: '["build/checksums/*.sha512"]' + asset_paths: '["build/libs/*.jar", "build/checksums/*.sha512"]'