-
Notifications
You must be signed in to change notification settings - Fork 17
55 lines (43 loc) · 1.29 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
49
50
51
52
53
54
55
name: Lerna Publish
on: workflow_dispatch
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache Yarn modules
uses: actions/cache@v3
with:
path: ~/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install
- name: Install Lerna
run: yarn global add [email protected]
- name: Configure Git identity
run: |
git config --global user.name "aguescribano87"
git config --global user.email "[email protected]"
- name: Run Lerna version
run: yarn lerna version patch --yes
- name: Run Lerna publish
run: yarn lerna publish from-package --yes
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Push changes to master
run: git push origin master --follow-tags
- name: Checkout and update development branch
run: |
git fetch origin development
git checkout development
git merge master
git push origin development --follow-tags