-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (45 loc) · 1.34 KB
/
publish.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
name: Publish with Lerna
on:
push:
branches:
- master
jobs:
Publish_Workflow:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Use node 18
uses: actions/setup-node@v4
with:
node-version: 18
- name: yarn config
run: yarn config set ignore-engines true
- name: Git Identity
run: |
git config --global user.name 'Loic Mahieu'
git config --global user.email '[email protected]'
git remote set-url origin https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare repository
run: git checkout "${GITHUB_REF:11}"
- name: Pulling
run: git pull
- name: Install dependencies
run: yarn install --pure-lockfile
- name: Build
run: yarn build
- name: Authenticate with Registry
run: |
yarn logout
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> $HOME/.npmrc
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish with Lerna
run: yarn lerna publish --yes --message 'chore(release)'
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}