From 893732a6d89f61ea3bdf96fb2881e8892db0962e Mon Sep 17 00:00:00 2001 From: DSR! Date: Mon, 17 Jun 2024 02:11:46 -0300 Subject: [PATCH] Add release code to workflows --- .github/workflows/builder-extras.yml | 14 +++++++++++++- .github/workflows/builder.yml | 13 +++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/builder-extras.yml b/.github/workflows/builder-extras.yml index 178caea..4e1c493 100644 --- a/.github/workflows/builder-extras.yml +++ b/.github/workflows/builder-extras.yml @@ -109,10 +109,22 @@ jobs: .\generate-checksums.ps1 -Directory "${{ github.workspace }}" -FilePattern "*.exe" -NoRecurse -OutputFile "${{ github.workspace }}/extras_installer_checksums.txt" - name: Upload Setup as Artifact + if: github.event_name != 'release' uses: actions/upload-artifact@v4 with: - name: setup-installer-artifact + name: extras-setup-installer-artifact path: | ${{ github.workspace }}/*.exe ${{ github.workspace }}/extras_tools_checksums.txt ${{ github.workspace }}/extras_installer_checksums.txt + + - name: Upload Setup as Artifact to Release + if: github.event_name == 'release' + uses: softprops/action-gh-release@v2 + with: + files: | + ${{ github.workspace }}/*.exe + ${{ github.workspace }}/extras_tools_checksums.txt + ${{ github.workspace }}/extras_installer_checksums.txt + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index dcb8e1b..b86e3c9 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -77,6 +77,7 @@ jobs: .\generate-checksums.ps1 -Directory "${{ github.workspace }}" -FilePattern "*.exe" -NoRecurse -OutputFile "${{ github.workspace }}/installer_checksums.txt" - name: Upload Setup as Artifact + if: github.event_name != 'release' uses: actions/upload-artifact@v4 with: name: setup-installer-artifact @@ -84,3 +85,15 @@ jobs: ${{ github.workspace }}/*.exe ${{ github.workspace }}/tools_checksums.txt ${{ github.workspace }}/installer_checksums.txt + + - name: Upload Setup as Artifact to Release + if: github.event_name == 'release' + uses: softprops/action-gh-release@v2 + with: + files: | + ${{ github.workspace }}/*.exe + ${{ github.workspace }}/tools_checksums.txt + ${{ github.workspace }}/installer_checksums.txt + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +