-
Notifications
You must be signed in to change notification settings - Fork 0
248 lines (238 loc) · 7.98 KB
/
Copy pathrelease.yml
File metadata and controls
248 lines (238 loc) · 7.98 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
name: release
on:
workflow_dispatch:
inputs:
channel:
description: Release policy channel
required: true
type: choice
options:
- preview
- stable
version:
description: Semantic release version (preview requires a prerelease)
required: true
type: string
publish:
description: Enter the separately approved public publication job
required: true
default: false
type: boolean
permissions:
contents: read
concurrency:
group: portreeve-release-${{ inputs.version }}
cancel-in-progress: false
env:
BUN_VERSION: 1.3.14
NODE_VERSION: 22
RELEASE_ROOT: dist/releases/${{ inputs.version }}
PORTREEVE_HOMEPAGE_URL: ${{ github.server_url }}/${{ github.repository }}
PORTREEVE_RELEASE_BASE_URL:
${{ github.server_url }}/${{ github.repository }}/releases/download
jobs:
prepare:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: ${{ env.NODE_VERSION }}
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- run: bun ci
- run: bun run check
- name: Prepare exact build-once release workspace
run: >-
bun run release:prepare -- --channel "${{ inputs.channel }}" --version "${{
inputs.version }}"
- uses: actions/upload-artifact@v7
with:
name: prepared-${{ inputs.version }}
path: ${{ env.RELEASE_ROOT }}
if-no-files-found: error
retention-days: 7
native-evidence:
needs: prepare
strategy:
fail-fast: false
matrix:
include:
- runner: macos-15
platform: macos-arm64
- runner: macos-15-intel
platform: macos-x64
- runner: ubuntu-24.04
platform: linux-x64
- runner: ubuntu-24.04-arm
platform: linux-arm64
runs-on: ${{ matrix.runner }}
name: native evidence (${{ matrix.platform }})
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: ${{ env.NODE_VERSION }}
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- run: bun ci
- uses: actions/download-artifact@v8
with:
name: prepared-${{ inputs.version }}
path: ${{ env.RELEASE_ROOT }}
- name: Restore promoted executable modes
run: chmod 755 "$RELEASE_ROOT"/artifacts/portreeve-v*
- if: startsWith(matrix.platform, 'linux-')
name: Verify a real mixed process and Docker stack
run: bun run stacks:verify
- name: Execute the promoted native artifact and supervised lifecycle
run: >-
bun run release:native-evidence -- --record
"$RELEASE_ROOT/release-record.json"
- uses: actions/upload-artifact@v7
with:
name: native-${{ matrix.platform }}
path: ${{ env.RELEASE_ROOT }}/evidence/native-${{ matrix.platform }}.json
if-no-files-found: error
retention-days: 7
aggregate-native-evidence:
needs: native-evidence
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: ${{ env.NODE_VERSION }}
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- run: bun ci
- uses: actions/download-artifact@v8
with:
name: prepared-${{ inputs.version }}
path: ${{ env.RELEASE_ROOT }}
- uses: actions/download-artifact@v8
with:
pattern: native-*
path: ${{ env.RELEASE_ROOT }}/evidence
merge-multiple: true
- name: Join the complete four-target evidence matrix once
run: >-
bun run release:merge-native-evidence -- --record
"$RELEASE_ROOT/release-record.json" --evidence
"$RELEASE_ROOT"/evidence/native-*.json
- uses: actions/upload-artifact@v7
with:
name: native-verified-${{ inputs.version }}
path: ${{ env.RELEASE_ROOT }}
if-no-files-found: error
retention-days: 7
desktop-evidence:
needs: aggregate-native-evidence
strategy:
fail-fast: false
matrix:
include:
- runner: macos-15
architecture: arm64
- runner: macos-15-intel
architecture: x64
runs-on: ${{ matrix.runner }}
name: Desktop evidence (macos-${{ matrix.architecture }})
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: ${{ env.NODE_VERSION }}
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- run: bun ci
- uses: actions/download-artifact@v8
with:
name: native-verified-${{ inputs.version }}
path: ${{ env.RELEASE_ROOT }}
- name: Restore promoted executable modes
run: chmod 755 "$RELEASE_ROOT"/artifacts/portreeve-v*
- name: Package, launch, mount, and verify the native Desktop DMG
run: >-
bun run release:package-desktop -- --record
"$RELEASE_ROOT/release-record.json" --arch "${{ matrix.architecture }}"
- uses: actions/upload-artifact@v7
with:
name: desktop-${{ matrix.architecture }}
path: |
${{ env.RELEASE_ROOT }}/artifacts/PortReeve-*-macos-${{ matrix.architecture }}.dmg
${{ env.RELEASE_ROOT }}/evidence/desktop-macos-${{ matrix.architecture }}.json
if-no-files-found: error
retention-days: 7
finalize-distribution:
needs: desktop-evidence
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: ${{ env.NODE_VERSION }}
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- run: bun ci
- uses: actions/download-artifact@v8
with:
name: native-verified-${{ inputs.version }}
path: ${{ env.RELEASE_ROOT }}
- uses: actions/download-artifact@v8
with:
pattern: desktop-*
path: ${{ env.RELEASE_ROOT }}
merge-multiple: true
- name: Finalize cask, checksums, update metadata, and publication plan
run: >-
bun run release:finalize-desktop -- --record
"$RELEASE_ROOT/release-record.json" --evidence
"$RELEASE_ROOT"/evidence/desktop-macos-*.json --current-update-manifest
distribution/desktop-update.json
- uses: actions/upload-artifact@v7
with:
name: distribution-${{ inputs.version }}
path: ${{ env.RELEASE_ROOT }}
if-no-files-found: error
retention-days: 14
publish:
if: inputs.publish
needs: finalize-distribution
runs-on: ubuntu-24.04
environment: release-publication
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: ${{ env.NODE_VERSION }}
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- run: bun ci
- uses: actions/download-artifact@v8
with:
name: distribution-${{ inputs.version }}
path: ${{ env.RELEASE_ROOT }}
- name: Publish exact prepared bytes after environment approval
run: >-
bun run release:publish -- --record "$RELEASE_ROOT/release-record.json"
--approved-by "${{ github.actor }} via release-publication environment"
--confirm
env:
GH_TOKEN: ${{ secrets.PORTREEVE_RELEASE_TOKEN }}
- uses: actions/upload-artifact@v7
with:
name: published-record-${{ inputs.version }}
path: |
${{ env.RELEASE_ROOT }}/release-record.json
${{ env.RELEASE_ROOT }}/publication-complete.json
if-no-files-found: error
retention-days: 30