From 6844d7744c24487fed55bf1d509fe49cd6f938b8 Mon Sep 17 00:00:00 2001 From: Jesus Osuna Date: Fri, 31 Jan 2025 17:45:53 -0300 Subject: [PATCH] update github action to publish correctly release files --- .github/workflows/release.yml | 67 +++++++---------------------------- 1 file changed, 12 insertions(+), 55 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3becb51..5bd04cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,7 @@ on: push: - # Sequence of patterns matched against refs/tags tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 name: Create Release @@ -23,58 +22,16 @@ jobs: run: ./gradlew build - name: Get Release Version id: get_version - run: VERSION=$(./gradlew currentVersion -q -Prelease.quiet) && echo ::set-output name=VERSION::$VERSION - - name: Create Release - id: create_release - uses: actions/create-release@v1.0.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ steps.get_version.outputs.VERSION }} - draft: false - prerelease: false - - - name: Upload Command Plugin (zip) - id: upload-release-asset-command - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./command/build/libs/command-v${{ steps.get_version.outputs.VERSION }}.zip - asset_name: command-${{ steps.get_version.outputs.VERSION }}.zip - asset_content_type: application/zip - - - name: Upload File Plugin (zip) - id: upload-release-asset-file - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./file/build/libs/file-v${{ steps.get_version.outputs.VERSION }}.zip - asset_name: file-${{ steps.get_version.outputs.VERSION }}.zip - asset_content_type: application/zip - - - name: Upload local-script Plugin (zip) - id: upload-release-asset-loca-script - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + VERSION=$(./gradlew currentVersion -q -Prelease.quiet) + echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: Create Release and Upload Assets + uses: softprops/action-gh-release@v1 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./local-script/build/libs/local-script-v${{ steps.get_version.outputs.VERSION }}.zip - asset_name: local-script-${{ steps.get_version.outputs.VERSION }}.zip - asset_content_type: application/zip - - - name: Upload waitfor Plugin (zip) - id: upload-release-asset-waitfor - uses: actions/upload-release-asset@v1 + files: | + ./command/build/libs/command-v${{ env.VERSION }}.zip + ./file/build/libs/file-v${{ env.VERSION }}.zip + ./local-script/build/libs/local-script-v${{ env.VERSION }}.zip + ./waitfor/build/libs/waitfor-v${{ env.VERSION }}.zip env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./waitfor/build/libs/waitfor-v${{ steps.get_version.outputs.VERSION }}.zip - asset_name: waitfor-${{ steps.get_version.outputs.VERSION }}.zip - asset_content_type: application/zip \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file