-
Notifications
You must be signed in to change notification settings - Fork 25
46 lines (45 loc) · 1.24 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
46
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release Please
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
releases_created: ${{steps.release.outputs.releases_created}}
paths_released: ${{steps.release.outputs.paths_released}}
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
id: release
with:
command: manifest
publish:
name: Publish npm packages
needs: release
if: ${{needs.release.outputs.releases_created}}
runs-on: ubuntu-latest
strategy:
matrix:
path_released: ${{fromJson(needs.release.outputs.paths_released)}}
steps:
- uses: actions/checkout@v3
if: ${{matrix.path_released != ''}}
- uses: ./.github/actions/pnpm
if: ${{matrix.path_released != ''}}
- run: pnpm lint
if: ${{matrix.path_released != ''}}
- run: pnpm test
if: ${{matrix.path_released != ''}}
- name: pnpm publish
if: ${{matrix.path_released != ''}}
run: |
cd ${{ matrix.path_released }}
pnpm install
pnpm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}