-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.26 KB
/
frontend-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
name: Frontend Release
on:
release:
types: [published]
defaults:
run:
working-directory: frontend
jobs:
testing:
name: Release
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- name: Checkout Project Code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: main
- name: Use NodeJS LTS
uses: actions/setup-node@v2
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: Lint
run: npm run check
- name: Test
run: npm run test
env:
CI: true
- name: Bump New Version
run: sh scripts/bump/exec.sh
env:
GIT_RELEASE_TOKEN: ${{ secrets.GIT_RELEASE_TOKEN }}
REPO: ${{ github.repository }}
VERSION_TAG: ${{ github.event.release.tag_name }}
- name: Re-build New Version
run: npm run build
- name: Publish
run: |
npx lerna publish from-package --yes --dist-tag \
"$([[ ${{ github.event.release.tag_name }} =~ alpha|beta|rc ]] && echo "next" || echo "latest")"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}