example: CVA #52
Workflow file for this run
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: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'main' | |
pull_request: {} | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
ci: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Check out repo | |
uses: actions/checkout@v3 | |
- name: βοΈ Set up Node | |
uses: actions/setup-node@v3 | |
- name: π Install dependencies | |
run: npm i --force # todo: this should be npm ci | |
- name: βοΈ Build | |
run: npm run build | |
# - name: π Lint | |
# run: npm run lint | |
# - name: π§ͺ Test | |
# run: npm run test:coverage | |
release: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
needs: ci | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: π Check out repo | |
uses: actions/checkout@v3 | |
- name: βοΈ Set up Node | |
uses: actions/setup-node@v3 | |
- name: π Install dependencies | |
run: npm i --force # todo: this should be npm ci | |
- name: βοΈ Build | |
run: npm run build | |
- name: π Release | |
if: github.repository == 'timdeschryver/ng-signal-forms' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta') | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
CI: true |