-
Notifications
You must be signed in to change notification settings - Fork 591
45 lines (37 loc) · 1.12 KB
/
publish-to-npm.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
name: Publish to NPM
on:
push:
branches-ignore:
# No canary deploys for branches opened by dependabot
- 'dependabot/**'
# documentation site should not trigger releases
- 'gh-pages'
paths-ignore:
- 'site/**'
jobs:
publish:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
name: Make a release and publish to NPM
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install Node dependencies
run: yarn --frozen-lockfile
- name: Build
run: yarn build
- name: Check NPM deployment
run: ./scripts/check-npm.sh
- name: Create release
run: npm run shipit
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_PAT }}