-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (45 loc) · 1.6 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
38
39
40
41
42
43
44
45
name: Release using release-please
on:
push:
branches:
- deploy
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: node
# The logic below handles the npm publication:
- uses: actions/checkout@v4
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v3
if: ${{ steps.release.outputs.release_created }}
with:
node-version: 16.17.1
registry-url: 'https://registry.npmjs.org'
- name: Install pnpm
if: ${{ steps.release.outputs.release_created }}
working-directory: .
# run: npm i [email protected] [email protected] -g
run: npm i [email protected] -g
- name: Install dependencies
if: ${{ steps.release.outputs.release_created }}
working-directory: .
run: pnpm i --frozen-lockfile
- name: Setup email & Update versions
if: ${{ steps.release.outputs.release_created }}
working-directory: .
run: |
git config user.name github-actions && git config user.email [email protected]
lerna version ${{ steps.release.outputs.tag_name }} --yes
# run: lerna version --yes
- name: Publish all packages
if: ${{ steps.release.outputs.release_created }}
working-directory: .
run: pnpm publish -r --publish-branch=deploy
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}