fix workflow YAML: avoid ! operator in unquoted if condition #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to npm | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| # Skip if this is the auto-version-bump commit | ||
| concurrency: | ||
| group: publish | ||
| cancel-in-progress: true | ||
| jobs: | ||
| publish: | ||
| # Don't run on the version bump commit itself | ||
| if: contains(github.event.head_commit.message, '[skip ci]') == false | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| id-token: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| registry-url: 'https://registry.npmjs.org' | ||
| - name: Configure git | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| - name: Bump patch version | ||
| run: npm version patch -m "chore: bump to %s [skip ci]" | ||
| - name: Push version bump | ||
| run: git push | ||
| - name: Publish to npm | ||
| run: npm publish --provenance --access public | ||