-
Notifications
You must be signed in to change notification settings - Fork 5
123 lines (117 loc) · 3.7 KB
/
release-please.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
on:
push:
branches:
- main
concurrency:
group: "release-${{ github.ref }}"
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
name: Run Release Please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
sdk-core--tag_name: ${{ steps.release.outputs['packages/sdk-core--tag_name']}}
sdk-core--release_created: ${{ steps.release.outputs['packages/sdk-core--release_created']}}
sdk-react-hooks--tag_name: ${{ steps.release.outputs['packages/sdk-react-hooks--tag_name']}}
sdk-react-hooks--release_created: ${{ steps.release.outputs['packages/sdk-react-hooks--release_created']}}
sdk-react-ui--tag_name: ${{ steps.release.outputs['packages/sdk-react-ui--tag_name']}}
sdk-react-ui--release_created: ${{ steps.release.outputs['packages/sdk-react-ui--release_created']}}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
token: ${{secrets.GITHUB_TOKEN}}
- name: Print release outputs for debugging
continue-on-error: true
run: |
echo "Release outputs:"
echo "${{ toJson(steps.release.outputs) }}"
release-sdk-core:
needs: release-please
if: ${{needs.release-please.outputs.sdk-core--release_created}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Build Packages
working-directory: ./packages/sdk-core
run: |
pnpm install
pnpm build
- name: Publish to NPM
working-directory: ./packages/sdk-core
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: pnpm publish
release-sdk-react-hooks:
needs: release-please
if: ${{needs.release-please.outputs.sdk-react-hooks--release_created}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Build Core
working-directory: ./packages/sdk-core
run: |
pnpm install
pnpm build
- name: Build Hooks
working-directory: ./packages/sdk-react-hooks
run: |
pnpm install
pnpm build
- name: Publish to NPM
working-directory: ./packages/sdk-react-hooks
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: pnpm publish
release-sdk-react-ui:
needs: release-please
if: ${{needs.release-please.outputs.sdk-react-ui--release_created}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Build Core
working-directory: ./packages/sdk-core
run: |
pnpm install
pnpm build
- name: Build Hooks
working-directory: ./packages/sdk-react-hooks
run: |
pnpm install
pnpm build
- name: Build UI
working-directory: ./packages/sdk-react-ui
run: |
pnpm install
pnpm build
- name: Publish to NPM
working-directory: ./packages/sdk-react-ui
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: pnpm publish