-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.63 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Release
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
release:
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
paths_released: ${{ steps.release.outputs.paths_released }}
runs-on: ubuntu-24.04
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Print release outputs
run: |
echo "Release created: ${{ steps.release.outputs.releases_created }}"
echo "Paths released: ${{ steps.release.outputs.paths_released }}"
publish:
runs-on: ubuntu-24.04
needs: release
if: needs.release.outputs.releases_created == 'true'
strategy:
matrix:
package: ${{ fromJSON(needs.release.outputs.paths_released) }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: ./pnpm-lock.yaml
registry-url: https://registry.npmjs.org
- name: Install dependencies
working-directory: ${{ matrix.package }}
run: pnpm install
- name: Build package
working-directory: ${{ matrix.package }}
run: pnpm build
- name: Publish package
working-directory: ${{ matrix.package }}
run: pnpm publish
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
NPM_CONFIG_PROVENANCE: true