Skip to content

Commit

Permalink
ci: fix release workflow condition (#132)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lachlancollins authored Aug 10, 2024
1 parent c0496a3 commit de3ad43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit de3ad43

Please sign in to comment.