-
Notifications
You must be signed in to change notification settings - Fork 13
45 lines (44 loc) · 1.36 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
name: Release
concurrency: release
on:
push:
branches: [main]
jobs:
publish:
environment: npm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v3
with:
always-auth: true
node-version: "20.11.1"
registry-url: https://registry.npmjs.org
- name: Install Dependencies
run: npm ci --no-optional
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Configure git
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{secrets.ROBOT_GITHUB_TOKEN}}
- name: Fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
env:
GITHUB_TOKEN: ${{secrets.ROBOT_GITHUB_TOKEN}}
- name: Lerna publish
run: |
npx lerna publish\
-m "chore(release): publish [skip ci]"\
--conventional-graduate\
--conventional-commits\
--yes
env:
GITHUB_TOKEN: ${{secrets.ROBOT_GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.ROBOT_NPM_TOKEN}}