-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (35 loc) · 1.26 KB
/
release.yaml
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
name: release
on: workflow_dispatch
jobs:
publish:
name: Create release and publish to NPM
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
token: ${{ secrets.N9_MACHINE_USER_BACKSTAGE_TOKEN }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Ensure access to NPM registry
run: npm whoami
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Config git user
run: |
git config --global user.name "n9-machine-user"
git config --global user.email "[email protected]"
git remote set-url origin https://n9-machine-user:${{ secrets.N9_MACHINE_USER_BACKSTAGE_TOKEN }}@github.com/$GITHUB_REPOSITORY
- name: Bump versions and publish packages
run: |
yarn install
npx lerna version --yes --conventional-commits --create-release github
npx lerna publish --yes from-package
env:
GH_TOKEN: ${{ secrets.N9_MACHINE_USER_BACKSTAGE_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}