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