generated from wuhan005/go-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (71 loc) · 1.87 KB
/
frontend.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
70
71
72
73
name: Build frontend
on:
release:
types:
- published
jobs:
production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: '16'
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 7
- name: Install dependencies
working-directory: web
run: pnpm install
- name: Build
working-directory: web
run: pnpm run build
- name: Archive
run: zip -r fe-production.zip web/dist
- name: Upload to release
uses: svenstaro/[email protected]
with:
file: fe-production.zip
overwrite: true
tag: ${{ github.event.release.tag_name }}
umd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: '16'
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 7
- name: Install dependencies
working-directory: web
run: pnpm install
- name: Build
working-directory: web
run: pnpm run umd
- name: Archive
run: zip -r fe-umd.zip web/dist
- name: Upload to release
uses: svenstaro/[email protected]
with:
file: fe-umd.zip
overwrite: true
tag: ${{ github.event.release.tag_name }}
- name: Create folder for npm package
run: |
mkdir -p package-umd
cp web/dist/* package-umd
cp package.json package-umd
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd package-umd
npm install
npm ci
npm publish --access public