-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (36 loc) · 1.08 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
name: Publish
on:
push:
branches:
- main
pull_request:
types: [closed]
branches:
- main
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
- run: yarn install --immutable
- uses: nrwl/nx-set-shas@v4
- if: github.ref != 'refs/heads/main'
run: git branch --track main origin/main
- run: yarn nx affected -t build --parallel=3
- name: "Version and publish"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
git config user.name "mittwald-machine"
git config user.email "[email protected]"
git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/$GITHUB_REPOSITORY
yarn lerna version --conventional-commits --conventional-prerelease=* --yes
yarn lerna publish from-git --yes --no-private