From c9c7fe8f3be3611f6c975efb7838cfe86a9646f4 Mon Sep 17 00:00:00 2001 From: Keelah Date: Sat, 12 Oct 2024 00:26:30 +0200 Subject: [PATCH] Edit pipeline for Nightly Releases --- .github/workflows/release.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dcab314..5cd30bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ on: workflow_dispatch: # ReleaseGen can be triggered manually env: - IS_TAG: ${{ github.ref_type == 'tag' }} + IS_RELEASE: ${{ github.ref_type == 'tag' }} ZIP_NAME: ${{ github.ref_type == 'tag' && 'Release_' || 'Release_Nightly_' }} ZIP_PATH: ${{ github.ref_type == 'tag' && 'FASTER_' || 'FASTER_Nightly_' }} @@ -97,7 +97,7 @@ jobs: - name: Set Version id: set_version run: | - if ($env:IS_TAG -eq "true") { + if ($env:IS_RELEASE -eq "true") { echo "VERSION=$env:GITHUB_REF" >> $env:GITHUB_ENV } else { echo "VERSION=${{ steps.get-version.outputs.version }}" >> $env:GITHUB_ENV @@ -105,18 +105,20 @@ jobs: shell: pwsh - name: Create Release + if: env.IS_RELEASE == 'true' id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token with: - tag_name: v${{ env.VERSION }} - release_name: ${{ env.IS_TAG == 'true' && 'Release' || 'PreRelease' }} ${{ env.VERSION }} + tag_name: 'v${{ env.VERSION }}' + release_name: 'Release v${{ env.VERSION }}' draft: false - prerelease: ${{ env.IS_TAG == 'false' }} + prerelease: ${{ env.IS_RELEASE == 'false' }} #Upload Artifacts - name: Upload Release Asset + if: env.IS_RELEASE == 'true' id: upload-release-asset uses: actions/upload-release-asset@v1 env: @@ -127,4 +129,14 @@ jobs: asset_path: .\${{ env.ZIP_NAME}}${{ env.Runtime }}.zip asset_name: ${{ env.ZIP_NAME}}${{ env.Runtime }}.zip asset_content_type: application/zip - \ No newline at end of file + + - name: Create Nightly Release + uses: andelf/nightly-release@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + Runtime: ${{ matrix.runtime }} + with: + tag_name: nightly + name: 'FASTER Nightly Release v${{ env.VERSION }}' + prerelease: true + files: .\${{ env.ZIP_NAME}}${{ env.Runtime }}.zip \ No newline at end of file