-
Notifications
You must be signed in to change notification settings - Fork 23
66 lines (54 loc) · 1.64 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
61
62
63
64
65
66
name: Release
on:
push:
branches: [master, next]
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install
run: npm ci
- name: Run Unit Test
run: npm run test:unit
- name: Build
if: ${{ github.ref == 'refs/heads/master' }}
run: npm run build:demo
- name: Run E2E Test
uses: cypress-io/github-action@v5
with:
start: npm run preview
record: true
browser: chrome
env:
# Recommended: pass the GitHub token lets this action correctly
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
- name: Deploy to vue-live.surge.sh
if: ${{ github.ref == 'refs/heads/master' }}
uses: dswistowski/surge-sh-action@v1
with:
domain: "vue-live.surge.sh"
project: "./dist/"
login: ${{ secrets.SURGE_LOGIN }}
token: ${{ secrets.SURGE_TOKEN }}
- name: Build
run: npm run build:lib
- name: Typings
run: npm run types:lib
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}