-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (72 loc) · 2.12 KB
/
Copy pathci.yml
File metadata and controls
72 lines (72 loc) · 2.12 KB
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
name: CI
on:
push:
branches:
- beta
- "release/**"
- test
paths-ignore:
- "**/*.md"
- "_templates"
pull_request:
branches:
- main
- beta
- "release/**"
- test
jobs:
tests:
name: Test or Build
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v5
with:
node-version: 12
- name: Install dependencies
run: rm -rf node_modules && yarn install --frozen-lockfile
- name: Build All Packages
run: yarn run build
release:
needs: tests
if: ${{ github.event_name == 'push' }}
name: Release or Prerelease
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v5
with:
node-version: 12
- name: Install dependencies
run: rm -rf node_modules && yarn install --frozen-lockfile
- name: Ensure access
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm whoami
- name: Config git user
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- name: Release
if: ${{ ! endsWith(github.ref, 'beta') }}
env:
GITHUB_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
GH_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
yarn run lerna publish
- name: Prerelease
if: ${{ endsWith(github.ref, 'beta') }}
env:
GITHUB_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
GH_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
yarn run lerna version --conventional-prerelease --yes
yarn run lerna publish from-package --yes