-
-
Notifications
You must be signed in to change notification settings - Fork 6
95 lines (89 loc) · 3.07 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
name: Release Please
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
server--tag_name: ${{ steps.release.outputs.server--tag_name}}
server--release_created: ${{ steps.release.outputs.server--release_created}}
client--tag_name: ${{ steps.release.outputs.client--tag_name}}
client--release_created: ${{ steps.release.outputs.client--release_created}}
docs--tag_name: ${{ steps.release.outputs.docs--tag_name}}
docs--release_created: ${{ steps.release.outputs.docs--release_created}}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
release-server:
if: ${{needs.release-please.outputs.server--release_created}}
runs-on: ubuntu-latest
needs: release-please
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- uses: ./.github/actions/setup-node-env
with:
node-version: 18
cache-path: server/node_modules
cache-key: "${{hashFiles('server/pnpm-lock.yaml')}}"
project: server
- run: zip -r server.zip server -x "**/node_modules/*"
- name: Upload Release Artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.release-please.outputs.server--tag_name }} server.zip
release-client:
if: ${{needs.release-please.outputs.client--release_created}}
runs-on: ubuntu-latest
needs: release-please
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- uses: ./.github/actions/setup-node-env
with:
node-version: 18
cache-path: client/node_modules
cache-key: "${{hashFiles('client/pnpm-lock.yaml')}}"
project: client
- run: zip -r client.zip client -x "**/node_modules/*"
- name: Upload Release Artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.release-please.outputs.client--tag_name }} client.zip
release-docs:
if: ${{needs.release-please.outputs.docs--release_created}}
runs-on: ubuntu-latest
needs: release-please
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- uses: ./.github/actions/setup-node-env
with:
node-version: 18
cache-path: docs/node_modules
cache-key: "${{hashFiles('docs/pnpm-lock.yaml')}}"
project: docs
- run: zip -r docs.zip docs -x "**/node_modules/*"
- name: Upload Release Artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.release-please.outputs.docs--tag_name }} docs.zip