-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (74 loc) · 2.31 KB
/
ci.yaml
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
74
75
76
77
78
name: ci
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
jobs:
ci:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'
- name: prepare
id: prepare
shell: bash
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" >> ~/.npmrc
git config user.name "GitHub Actions Build"
git config user.email "contact@starlay.finance"
- name: install
id: install
run: |
yarn install --frozen-lockfile
- id: lint
name: lint
run: |
yarn lint
- id: cover
name: cover
run: |
yarn cover
- id: build
name: build
run: |
yarn build
# https://github.com/lerna/lerna/issues/2788 --no-verify-access
# https://github.com/lerna/lerna/issues/1893 --preid ${{ github.sha }}
- id: prerelease
name: prerelease
if: |
github.event.pull_request.head.repo.full_name == github.repository &&
!contains(github.head_ref, 'dependabot') &&
github.ref != 'refs/heads/main'
run: |
yarn release:canary --yes --no-verify-access --dist-tag ${{ github.sha }} --preid ${{ github.sha }}
#- uses: actions/github-script@v4
# if: |
# github.event.pull_request.head.repo.full_name == github.repository &&
# !contains(github.head_ref, 'dependabot') &&
# github.ref != 'refs/heads/main'
# with:
# script: |
# github.issues.createComment({
# issue_number: context.issue.number,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: '🎉 Canary Release. You can install canary version via `npm install package@next`'
# })
- id: release
name: release
if: |
github.ref == 'refs/heads/main' &&
!contains(github.event.head_commit.message, 'chore(release)')
run: |
yarn release:check
yarn release:latest --yes --no-verify-access