-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.21 KB
/
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
name: Version and publish
on:
push:
branches:
- main
jobs:
publish:
name: Publish to npm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.REPO_ADMIN_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: lts/gallium
- name: Sync packages with cache
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-node_modules-
- name: Install packages
run: yarn install --frozen-lockfile
- name: Build packages
run: yarn build
- name: Config git user
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- name: Generate .npmrc
run: yarn generate:npmrc:ci
- name: Bump versions and publish packages
run: |
yarn version:lerna:ci
yarn publish:lerna:ci
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}