-
-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (54 loc) · 1.51 KB
/
ci.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
61
62
63
64
65
66
67
68
69
name: CI
on:
push:
branches: [main]
release:
types:
- created
jobs:
deploy_www:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "14.x"
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: |
npm install
- name: Build Release with Piral
run: |
npm run build:www
cd dist/release
ln -s index.html 404.html
- name: Deploy with gh-pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm run deploy -- -u "github-actions-bot <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release_npm:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "14.x"
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: |
npm install
- name: Build SDK with Piral
run: |
npm run build:sdk
- name: Publish NPM Package
run: |
mv dist/emulator/*.tgz sdk.tgz
npm publish sdk.tgz --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}