-
-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (47 loc) · 1.3 KB
/
release-publish.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
name: Release
on:
push:
tags:
- v*
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.SP_CI_AT }}
- name: Setup NodeJS 14
uses: actions/setup-node@v2
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'
# Prepare
- name: Install NPM
run: npm install
- name: Build
run: npm run build
# Publish to NPM
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: npm publish
# Deploy to CDN (trigger)
- name: Tirgger deploy to CDN
run: |
git tag deploy
git push origin HEAD:main deploy
# Bump version to next snapshot
- name: Bump snapshot version
run: |
npm run bump -- --version=patch --snapshot
npm install
echo "SNAPSHOT_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV
- name: Push changes
run: |
git fetch
git config user.email "[email protected]"
git config user.name "sign-pad CI"
git add --all
git commit -m "set version to ${{ env.SNAPSHOT_VERSION }}"
git push origin HEAD:main