From 489d04ef0aecaed751e4db0a951cb7ca1adc6f65 Mon Sep 17 00:00:00 2001 From: Jerome Thayananthajothy Date: Sat, 17 Aug 2024 20:12:03 +0100 Subject: [PATCH] Update GitHub Actions workflow to download artifacts and upload release assets --- .github/workflows/release.yml | 46 ++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 58d9cd2..e08e1ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,10 +39,29 @@ jobs: release: needs: build runs-on: ubuntu-latest + steps: - name: Checkout code uses: actions/checkout@v2 + - name: Download Artifacts + uses: actions/download-artifact@v2 + with: + name: comet-ubuntu-latest + path: ./artifacts/ubuntu + + - name: Download Artifacts + uses: actions/download-artifact@v2 + with: + name: comet-windows-latest + path: ./artifacts/windows + + - name: Download Artifacts + uses: actions/download-artifact@v2 + with: + name: comet-macos-latest + path: ./artifacts/macos + - name: Create Release id: create_release uses: actions/create-release@v1 @@ -54,13 +73,32 @@ jobs: draft: false prerelease: false - - name: Upload Release Asset - id: upload-release-asset + - name: Upload Release Asset for Ubuntu + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./artifacts/ubuntu/**/*.* + asset_name: comet-ubuntu-${{ github.sha }}.zip + asset_content_type: application/zip + + - name: Upload Release Asset for Windows + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./artifacts/windows/**/*.* + asset_name: comet-windows-${{ github.sha }}.zip + asset_content_type: application/zip + + - name: Upload Release Asset for macOS uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: out/make/**/*.* - asset_name: comet-${{ matrix.os }}-${{ github.sha }}.zip + asset_path: ./artifacts/macos/**/*.* + asset_name: comet-macos-${{ github.sha }}.zip asset_content_type: application/zip