Skip to content

Commit 48ba96c

Browse files
committed
ci: use one workflow
1 parent 79019d5 commit 48ba96c

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@ name: ci
33
on:
44
push:
55
branches:
6-
- main
7-
pull_request:
8-
types: [opened, synchronize, reopened]
6+
- 'main'
7+
pull_request: {}
98

109
jobs:
1110
build_test_release:
1211
strategy:
1312
matrix:
14-
os: [ubuntu-latest, windows-latest]
15-
node-version: [12, 14]
13+
node-version: ${{ fromJSON(github.ref == 'refs/heads/main' && '[16]' || '[12,14,16]') }}
14+
os: ${{ fromJSON(github.ref == 'refs/heads/main' && '["ubuntu-latest"]' || '["ubuntu-latest", "windows-latest"]') }}
1615
runs-on: ${{ matrix.os }}
1716

1817
steps:
@@ -28,8 +27,8 @@ jobs:
2827
- name: test
2928
run: npm run test -- --ci --code-coverage
3029
- name: Release
31-
if: github.repository == 'testing-library/angular-testing-library' && github.ref == 'refs/heads/main' && matrix.node-version == 14 && matrix.os == 'ubuntu-latest'
30+
if: github.repository == 'testing-library/angular-testing-library' && github.ref == 'refs/heads/main'
31+
run: npx semantic-release
3232
env:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
35-
run: npx semantic-release

0 commit comments

Comments
 (0)