ci: enable semantic-release #60
Workflow file for this run
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: Test and Release (if master) | |
| on: | |
| push: | |
| pull_request: | |
| branches: | |
| - 'master' | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - run: npm ci | |
| - run: npm test | |
| - name: Release to npm registry | |
| # only release from the master branch in parent repository, not in a fork | |
| if: (github.ref == 'refs/heads/master') && | |
| (github.repository == 'cypress-io/commit-info') | |
| run: npx semantic-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |