-
Notifications
You must be signed in to change notification settings - Fork 322
37 lines (35 loc) · 1.13 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
name: Release new version
on: workflow_dispatch
jobs:
release:
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: https://registry.npmjs.org/
- name: Install
run: yarn
- name: Lint
run: yarn lerna run lint --since
- name: Build
run: yarn lerna run build --since
- name: Test
run: yarn lerna run test --since
- name: Set up git credentials
run: |
git config --global user.name 'ci'
git config --global user.email 'deploy@monday.com'
- name: Generate new versions
run: yarn lerna version --conventional-commits -y
- run: yarn config set registry https://registry.npmjs.org/
- name: Setup .npmrc for publish
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" > .npmrc
- name: Publish to npm
run: yarn lerna publish from-package
- name: Remove .npmrc
if: success() || failure()
run: rm .npmrc