Skip to content

Commit

Permalink
fix IS_NIGHTLY env uses (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
poszu authored Oct 29, 2024
1 parent 86216b2 commit 2e32d62
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Compute release name and tag
id: release_info
run: |
if [[ $IS_NIGHTLY ]]; then
if [[ $IS_NIGHTLY == true ]]; then
echo "tag_name=nightly-${GITHUB_SHA}" >> $GITHUB_OUTPUT
echo "release_name=Nightly ($(date '+%Y-%m-%d'))" >> $GITHUB_OUTPUT
elif [[ "${GITHUB_REF_NAME}" == "main" ]]; then
Expand All @@ -51,7 +51,7 @@ jobs:
# which allows users to roll back. It is also used to build
# the changelog.
- name: Create build-specific nightly tag
if: ${{ env.IS_NIGHTLY }}
if: env.IS_NIGHTLY == 'true'
uses: rickstaa/action-create-tag@v1
with:
tag: ${{ steps.release_info.outputs.tag_name }}
Expand All @@ -69,7 +69,7 @@ jobs:
uses: mikepenz/release-changelog-builder-action@v5
with:
configuration: "./.github/changelog.json"
fromTag: ${{ env.IS_NIGHTLY && 'nightly' || '' }}
fromTag: ${{ env.IS_NIGHTLY == 'true' && 'nightly' || '' }}
toTag: ${{ steps.release_info.outputs.tag_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
PLATFORM_NAME: ${{ matrix.platform }}
TARGET: ${{ matrix.target }}
ARCH: ${{ matrix.arch }}
VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
VERSION_NAME: ${{ (env.IS_NIGHTLY == 'true' && 'nightly') || needs.prepare.outputs.tag_name }}
shell: bash
run: |
if [ "$PLATFORM_NAME" == "linux" ]; then
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
# If this is a nightly release, it also updates the release
# tagged `nightly` for compatibility with `foundryup`
- name: Update nightly release
if: ${{ env.IS_NIGHTLY }}
if: env.IS_NIGHTLY == 'true'
uses: softprops/action-gh-release@v2
with:
name: "Nightly"
Expand All @@ -218,13 +218,15 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
needs: release
permissions:
contents: write # to delete a release
if: always()
steps:
- uses: actions/checkout@v4

# Moves the `nightly` tag to `HEAD`
- name: Move nightly tag
if: ${{ env.IS_NIGHTLY }}
if: env.IS_NIGHTLY == 'true'
uses: actions/github-script@v7
with:
script: |
Expand Down

0 comments on commit 2e32d62

Please sign in to comment.