-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.07 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
# .github/release.yml
name: Release on npm
on:
push:
branches:
- 'master'
paths:
- package.json
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 16
- name: Install dependencies
run: |
yarn install
- name: Build
run: |
yarn clean
yarn build
- id: publish
name: Publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
dry-run: false
- name: Post-publish
if: steps.publish.outputs.type != 'none'
run: |
echo "Published ${{ steps.publish.outputs.type }} version: ${{ steps.publish.outputs.version }}"
- name: Publish skipped
if: steps.publish.outputs.type == 'none'
run: |
echo "Version in package.json has not changed. Skipping."
exit 0