From 43d69d48b5f9f3f28b4993791251e9dc376afcdf Mon Sep 17 00:00:00 2001 From: krrishnaaaa Date: Sun, 13 Oct 2024 14:57:03 +0530 Subject: [PATCH] fixed release workflow --- .github/workflows/release.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e03970..d375413 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,10 +28,9 @@ jobs: # Step 4: Create a new release - name: 📦 Create Release id: create_release - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | - const { exec } = require('child_process'); const { promises: fs } = require('fs'); // Get the latest tag @@ -63,9 +62,8 @@ jobs: echo "jar_file_name=$jar_file" >> $GITHUB_ENV - name: 🎁 Upload shadowJar to Release - uses: actions/upload-release-asset@v1 + uses: Roang-zero1/github-upload-release-artifacts-action@v3 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ env.jar_file_name }} - asset_name: ${{ env.jar_file_name }} # Use the dynamic name here - asset_content_type: application/java-archive + file: build/libs/${{ env.jar_file_name }}.jar + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file