-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (49 loc) · 1.47 KB
/
release.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
59
60
name: Release
on:
push:
branches: [main]
jobs:
release:
name: Release
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://npm.pkg.github.com"
- name: Install dependencies
run: yarn install
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Build
run: yarn build
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//npm.pkg.github.com/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release Pull Request or Publish to GitHub registry
id: changesets
uses: changesets/action@v1
with:
version: yarn release:version
publish: yarn release:publish
env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to NPM
if: steps.changesets.outputs.hasChangesets == 'false'
run: npm publish --@lottie-animation-community:registry=https://registry.npmjs.org