From de3ad432aa668fc56d47e00c0b32ba3ba67097ee Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sat, 10 Aug 2024 12:07:49 +1000 Subject: [PATCH] ci: fix release workflow condition (#132) This job should not have run: https://github.com/oxc-project/eslint-plugin-oxlint/actions/runs/10327248826/job/28592123359 I accidentally put quotes around the [contains](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/expressions#contains) function in #131 - however, removing them generates a YAML error with the colon in `'release: v'` (`"release: v"` also fails). A workaround is to use the [startsWith](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/expressions#startswith) function. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2356a20..0fac136 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ permissions: jobs: release: - if: "contains(github.event.head_commit.message, 'release: v')" + if: startsWith(github.event.head_commit.message, 'release') runs-on: ubuntu-latest steps: - uses: actions/checkout@v4