-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (46 loc) · 1.45 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: main
on: [push]
jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: Checkout
# https://github.com/actions/checkout
uses: actions/checkout@v4
with:
# we need multiple branches
# in order to detect Git changes
fetch-depth: 0
- uses: bahmutov/npm-install@v1
- name: Run tests
run: npm test
- name: Demo finding test ids in source files
run: npm run demo:sources
- name: Demo finding test ids in specs
run: npm run demo:specs
- name: Demo warning about untested ids
run: npm run demo:warn
- name: Demo find changed specs for changed test ids
run: npm run demo:changed
- name: Demo find test ids in changed source files
run: npm run demo:changed:ids -- --set-gha-outputs
- name: Print specs that use specific test ids
run: npm run demo:ids:specs -- --set-gha-outputs
release:
runs-on: ubuntu-20.04
needs: test
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: bahmutov/npm-install@v1
# https://github.com/cycjimmy/semantic-release-action
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
id: semantic
with:
branch: main
dry_run: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}