Skip to content

Commit

Permalink
ci: add concurrency rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ChlodAlejandro committed Feb 29, 2024
1 parent d994d97 commit e8f3429
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ jobs:
needs: build
runs-on: ubuntu-latest

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}--test-browser
cancel-in-progress: true

steps:
- uses: actions/checkout@v4
- name: Use Node.js latest
Expand All @@ -95,6 +99,10 @@ jobs:
matrix:
node-version: [ 14.x, 'lts/*', latest ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}--test-${{ matrix.node-version }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -110,11 +118,15 @@ jobs:
path: dist
- name: Test (node)
run: npm run test:node
deploy:
publish:
name: Publish (npm)
needs: [ test-node, test-browser ]
if: ${{ startsWith( github.ref, 'refs/tags/v' ) }}

concurrency:
group: ${{ github.workflow }}--publish
cancel-in-progress: true

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit e8f3429

Please sign in to comment.