-
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (59 loc) · 1.89 KB
/
ci-cd.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
name: CI/CD
on:
push:
pull_request:
types: [opened, edited, reopened, synchronize]
env:
FORCE_COLOR: 3 # Diplay chalk colors
jobs:
ci:
name: Integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd
with:
version: 7
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
with:
node-version: 16.x
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Run integration tests
run: pnpm ci
- uses: coverallsapp/github-action@9ba913c152ae4be1327bfb9085dc806cedb44057
name: Report code coverage
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: 47ng/actions-slack-notify@main
name: Notify on Slack
if: always()
with:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
cd:
name: Deployment
runs-on: ubuntu-latest
needs: [ci]
if: ${{ github.ref_name == 'main' || github.ref_name == 'beta' || github.ref_name == 'alpha' }}
steps:
- uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd
with:
version: 7
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
with:
node-version: 16.x
cache: pnpm
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
- name: Build package
run: pnpm build
- name: Semantic Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
SCEAU_PRIVATE_KEY: ${{ secrets.SCEAU_PRIVATE_KEY }}