From 6513f3c31e91bb176a7b595fd803ead1af461169 Mon Sep 17 00:00:00 2001 From: deirn Date: Fri, 12 Apr 2024 23:05:50 +0700 Subject: [PATCH] update workflows --- .github/workflows/build_head.yml | 8 ++++---- .github/workflows/build_release.yml | 19 +++++++++---------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_head.yml b/.github/workflows/build_head.yml index e946f00..882f6ce 100644 --- a/.github/workflows/build_head.yml +++ b/.github/workflows/build_head.yml @@ -17,10 +17,10 @@ jobs: - id: vars run: | echo "git_hash=${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: - java-version: 17 + java-version: 21 distribution: temurin - run: chmod +x gradlew - uses: actions/cache@v3 @@ -30,7 +30,7 @@ jobs: - run: ./gradlew build env: GIT_HASH: ${{ steps.vars.outputs.git_hash }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: badpackets-${{ steps.vars.outputs.git_hash }} path: "./platform/*/build/libs/**.jar" diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index baa5ff0..683ac3b 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -9,10 +9,10 @@ jobs: - id: vars run: | echo "version=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: - java-version: 17 + java-version: 21 distribution: temurin - run: chmod +x gradlew - run: ./gradlew build publish curseforge modrinth @@ -28,16 +28,15 @@ jobs: - run: | b2 sync --replaceNewer .b2 b2://maven-bai-lol b2 clear-account - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: badpackets-${{ steps.vars.outputs.git_hash }} path: "./platform/*/build/libs/**.jar" - - uses: alexellis/upload-assets@259de5111cb56966d046ced998941e93f91d2c93 + - uses: softprops/action-gh-release@v1 env: GITHUB_TOKEN: ${{ github.token }} with: - asset_paths: | - [ - "./platform/*/build/libs/*[0-9.].jar", - "./platform/*/build/libs/*[0-9.]-api.jar" - ] + tag_name: ${{ steps.vars.outputs.version }} + files: | + ./platform/*/build/libs/*[0-9.].jar + ./platform/*/build/libs/*[0-9.]-api.jar