File tree Expand file tree Collapse file tree 2 files changed +16
-37
lines changed Expand file tree Collapse file tree 2 files changed +16
-37
lines changed Original file line number Diff line number Diff line change 1
1
name : ci
2
2
3
- on : pull_request
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' main'
7
+ pull_request : {}
4
8
5
9
jobs :
6
- build_and_test :
10
+ build_test_release :
7
11
strategy :
8
12
matrix :
9
- os : [ubuntu-latest, windows-latest]
10
- node : [12, 14, 16]
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"]') }}
11
15
runs-on : ${{ matrix.os }}
16
+
12
17
steps :
13
18
- uses : actions/checkout@v2
14
- - name : use Node.js ${{ matrix.node-version }}
19
+ - name : use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
15
20
uses : actions/setup-node@v2
16
21
with :
17
22
node-version : ${{ matrix.node-version }}
21
26
run : npm run build -- --skip-nx-cache
22
27
- name : test
23
28
run : npm run test -- --ci --code-coverage
29
+ - name : Release
30
+ if : github.repository == 'testing-library/angular-testing-library' && github.ref == 'refs/heads/main'
31
+ run : npx semantic-release
32
+ env :
33
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments