File tree Expand file tree Collapse file tree 3 files changed +36
-10
lines changed
Expand file tree Collapse file tree 3 files changed +36
-10
lines changed Original file line number Diff line number Diff line change 11# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
2- # This workflow will protect the main branch by testing and linting new PRs and commits
2+ # This workflow will protect the main branch by testing and linting new commits
33
44name : Main CI
55
66# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push
77on :
88 push :
9- branches :
10- - main
9+ branches : [main]
1110
1211jobs :
1312 test :
2423 - uses : actions/setup-node@v4
2524 with :
2625 node-version : ${{ matrix.node-version }}
27- cache : " npm"
26+ cache : npm
2827 - run : npm ci --package-lock
2928 - run : npm test
3029
3534 - uses : actions/setup-node@v4
3635 with :
3736 node-version : 18
38- cache : " npm"
37+ cache : npm
3938 - run : npm ci --package-lock
4039 - run : npm run lint:ci
Original file line number Diff line number Diff line change 11# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
2- # This workflow will protect the main branch by testing and linting new PRs and commits
2+ # This workflow will protect the main branch by testing and linting new PRs
33
44name : Main PR
55
66# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
77on :
88 pull_request :
9- branches :
10- - main
9+ branches : [main]
1110
1211jobs :
1312 test :
2423 - uses : actions/setup-node@v4
2524 with :
2625 node-version : ${{ matrix.node-version }}
27- cache : " npm"
26+ cache : npm
2827 - run : npm ci --package-lock
2928 - run : npm test
3029
3534 - uses : actions/setup-node@v4
3635 with :
3736 node-version : 18
38- cache : " npm"
37+ cache : npm
3938 - run : npm ci --package-lock
4039 - run : npm run lint:ci
Original file line number Diff line number Diff line change 1+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
2+ # This workflow will publish any new release to the npmjs registry
3+
4+ name : Publish Release
5+
6+ # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
7+ on :
8+ workflow_dispatch :
9+ release :
10+ types : [released]
11+
12+ jobs :
13+ publish :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v4
17+ - uses : actions/setup-node@v4
18+ with :
19+ node-version : 18
20+ cache : npm
21+ # NOTE: the explicit registry-url is currently needed for the auth token to work
22+ registry-url : https://registry.npmjs.org/
23+ - run : npm ci --package-lock
24+ - run : npm test
25+ - run : npm run lint:ci
26+ - run : npm publish --access public
27+ env :
28+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
You can’t perform that action at this time.
0 commit comments