From c069832d6df78467c446bafd5d2f00e518539de5 Mon Sep 17 00:00:00 2001 From: Benjamen Meyer Date: Tue, 1 Oct 2024 00:12:06 -0400 Subject: [PATCH] Actions: migrate release artifact GH action - unify to a single release artifact uploader for all platforms - move to an official release artifact uploader instead of just an artifact uploader --- .github/workflows/Windows-Release.yml | 19 ++++++------------- .github/workflows/gh-actions-release.yml | 9 ++++----- .github/workflows/macos-release.yml | 19 ++++++------------- 3 files changed, 16 insertions(+), 31 deletions(-) diff --git a/.github/workflows/Windows-Release.yml b/.github/workflows/Windows-Release.yml index c155432ec..a70dd0eff 100644 --- a/.github/workflows/Windows-Release.yml +++ b/.github/workflows/Windows-Release.yml @@ -122,16 +122,9 @@ jobs: name: test_results_xml path: ${{github.workspace}}/build/test-results/**/*.xml - #- name: Upload artifacts - # uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3 - # with: - # path: "${{ github.workspace }}/build/**/*.zip" - - # TODO: Find/write a tool to upload release for Windows - # - name: Upload artifacts - # uses: skx/github-action-publish-binaries@44887b225ceca96efd8a912d39c09ad70312af31 # master - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # ARTIFACT_EXT: ${{ matrix.ARTIFACT_EXT }} - # with: - # path: "${{ github.workspace }}/**/*.zip" + - name: Upload the artifacts + uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 + if: startsWith(github.ref, 'refs/tags/') + with: + token: ${{ secrets.GITHUB_TOKEN }} + files: "packages/*.${{ matrix.ARTIFACT_EXT }}" diff --git a/.github/workflows/gh-actions-release.yml b/.github/workflows/gh-actions-release.yml index f2d6b942f..0fb0c066e 100644 --- a/.github/workflows/gh-actions-release.yml +++ b/.github/workflows/gh-actions-release.yml @@ -129,9 +129,8 @@ jobs: run: script/cibuild $FLAGS - name: Upload the artifacts - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ARTIFACT_EXT: ${{ matrix.ARTIFACT_EXT }} + uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 + if: startsWith(github.ref, 'refs/tags/') with: - args: "packages/*.${{ matrix.ARTIFACT_EXT }}" + token: ${{ secrets.GITHUB_TOKEN }} + files: "packages/*.${{ matrix.ARTIFACT_EXT }}" diff --git a/.github/workflows/macos-release.yml b/.github/workflows/macos-release.yml index bfce46737..3789cd50b 100644 --- a/.github/workflows/macos-release.yml +++ b/.github/workflows/macos-release.yml @@ -106,16 +106,9 @@ jobs: name: test_results_xml path: ${{github.workspace}}/build/test-results/**/*.xml - #- name: Upload the artifacts - # uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3 - # with: - # args: "packages/*.${{ matrix.ARTIFACT_EXT }}" - - # TODO: Find/write a tool to upload release for Mac OS - # - name: Upload the artifacts - # uses: skx/github-action-publish-binaries@44887b225ceca96efd8a912d39c09ad70312af31 # master - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # ARTIFACT_EXT: ${{ matrix.ARTIFACT_EXT }} - # with: - # args: "packages/*.${{ matrix.ARTIFACT_EXT }}" + - name: Upload the artifacts + uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 + if: startsWith(github.ref, 'refs/tags/') + with: + token: ${{ secrets.GITHUB_TOKEN }} + files: "packages/*.${{ matrix.ARTIFACT_EXT }}"