limit the release job #486
This file contains 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: ci | |
on: [push, pull_request] | |
jobs: | |
tests: | |
# https://github.com/bahmutov/cypress-workflows | |
uses: bahmutov/cypress-workflows/.github/workflows/parallel.yml@v1 | |
with: | |
n: 3 | |
start: npm start | |
wait-on: 'http://localhost:3000' | |
secrets: | |
recordKey: ${{ secrets.CYPRESS_RECORD_KEY }} | |
release: | |
runs-on: ubuntu-20.04 | |
needs: ['tests'] | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout 🛎 | |
uses: actions/checkout@v4 | |
- name: Semantic Release 🚀 | |
uses: cycjimmy/semantic-release-action@v4 | |
with: | |
branches: main | |
env: | |
# github token is automatically created by the GH Action workflow | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# created using semantic-release | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |