From 2e32d62cd2854b15a889b1c941cb4d5a9d92262a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20R=C3=B3=C5=BCa=C5=84ski?= Date: Tue, 29 Oct 2024 14:46:15 +0100 Subject: [PATCH] fix IS_NIGHTLY env uses (#199) --- .github/workflows/release.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00b377a9..e50a781a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 }} @@ -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 }} @@ -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 @@ -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" @@ -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: |