From 8638f4a11da1e202b7f84b080830b0425618c257 Mon Sep 17 00:00:00 2001 From: TIMER_err Date: Sat, 21 Sep 2024 23:42:10 +0800 Subject: [PATCH] workflow build --- .github/workflows/build.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 716ee3d..7c87486 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,8 +54,13 @@ jobs: run: sudo java -jar builder.jar release 1.18.1 ${{ steps.setup-jdk17.outputs.path }}/bin/javac - name: pack run: sudo java -jar builder.jar release - - name: Upload artifact - run: | - cd build/libs - export JAR=$(find . 'injector.jar') - curl --connect-timeout 30 -m 300 -X POST -F "artifact=@injector.jar" -H "Authorization: ${{ secrets.NIGHTLY_PASS }}" -F "gh_id=${{ github.event.head_commit.id }}" -F "gh_ref=${{ github.ref }}" -F "gh_message=${{ github.event.head_commit.message }}" -F "gh_timestamp=${{ github.event.head_commit.timestamp }}" + - name: Upload JAR to Release + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: build/injector.jar + asset_name: injector.jar + asset_content_type: application/java-archive