Skip to content

Commit

Permalink
Edit pipeline for Nightly Releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxlider committed Oct 11, 2024
1 parent c8d728c commit c9c7fe8
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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_' }}

Expand Down Expand Up @@ -97,26 +97,28 @@ 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
}
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:
Expand All @@ -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


- 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

0 comments on commit c9c7fe8

Please sign in to comment.