@@ -31,15 +31,27 @@ jobs:
31
31
runs-on : ubuntu-latest
32
32
env :
33
33
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
+ outputs :
35
+ version_tag : ${{ steps.get_version.outputs.VERSION_TAG }}
34
36
steps :
37
+ - name : Checkout git repo
38
+ # only run this on "push" to "master" or alpha releases
39
+ uses : actions/checkout@v4
40
+ # We only need a few files in this run, no point cloning everything
41
+ with :
42
+ sparse-checkout : |
43
+ package.json
44
+ build/release-notes.md
45
+ build/release-notes-alpha.md
46
+ sparse-checkout-cone-mode : false
47
+
35
48
- name : Get version tag from package.json
36
49
id : get_version
37
- # only run this on "push" to "master" or alpha releases
38
- if : ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
39
50
run : |
40
51
version=$(node -p "require('./package.json').version")
41
52
echo "VERSION_TAG=$version" >> "$GITHUB_OUTPUT"
42
- - name : Upload changes to draft release
53
+
54
+ - name : Create draft release
43
55
# only run this on "push" to "master" or alpha releases
44
56
if : ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
45
57
uses : ncipollo/release-action@v1
49
61
draft : true
50
62
bodyFile : ${{ env.SHOULD_PUBLISH_ALPHA == 'true' && 'build/release-notes-alpha.md' || 'build/release-notes.md' }}
51
63
allowUpdates : true
52
- omitNameDuringUpdate : true
53
- omitBodyDuringUpdate : true
54
- replacesArtifacts : true
55
- updateOnlyUnreleased : true
56
64
57
65
build_linux :
58
66
runs-on : ubuntu-22.04
@@ -139,18 +147,8 @@ jobs:
139
147
sparse-checkout : |
140
148
package.json
141
149
build/setup-release-combine.sh
142
- build/release-notes.md
143
- build/release-notes-alpha.md
144
150
sparse-checkout-cone-mode : false
145
151
146
- - name : Get version tag from package.json
147
- id : get_version
148
- # only run this on "push" to "master" or alpha releases
149
- if : ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
150
- run : |
151
- version=$(node -p "require('./package.json').version")
152
- echo "VERSION_TAG=$version" >> "$GITHUB_OUTPUT"
153
-
154
152
- name : Download release metadata
155
153
# only run this on "push" to "master" or alpha releases
156
154
if : ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
@@ -171,10 +169,7 @@ jobs:
171
169
if : ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
172
170
uses : ncipollo/release-action@v1
173
171
with :
174
- tag : v${{ steps.get_version.outputs.VERSION_TAG }}
175
- name : ' Session ${{ steps.get_version.outputs.VERSION_TAG }}'
176
- draft : true
177
- bodyFile : ${{ env.SHOULD_PUBLISH_ALPHA == 'true' && 'build/release-notes-alpha.md' || 'build/release-notes.md' }}
172
+ tag : v${{ needs.create_draft_release.outputs.version_tag }}
178
173
artifacts : ' dist/latest-linux.yml'
179
174
allowUpdates : true
180
175
omitNameDuringUpdate : true
@@ -286,24 +281,19 @@ jobs:
286
281
post_build_mac :
287
282
needs : [build_mac_arm64, build_mac_x64]
288
283
runs-on : ubuntu-22.04
284
+ env :
285
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
289
286
steps :
290
287
- name : Checkout git repo
291
288
# only run this on "push" to "master" or alpha releases
292
289
if : ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
293
290
uses : actions/checkout@v4
294
- # We only need the package.json file in this run (to extract the version being built)
291
+ # We only need a few files in this run, no point cloning everything
295
292
with :
296
293
sparse-checkout : |
297
294
package.json
298
295
build/setup-release-combine.sh
299
-
300
- - name : Get version tag from package.json
301
- id : get_version
302
- # only run this on "push" to "master" or alpha releases
303
- if : ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
304
- run : |
305
- version=$(node -p "require('./package.json').version")
306
- echo "VERSION_TAG=$version" >> "$GITHUB_OUTPUT"
296
+ sparse-checkout-cone-mode : false
307
297
308
298
- name : Download release metadata
309
299
# only run this on "push" to "master" or alpha releases
@@ -325,13 +315,10 @@ jobs:
325
315
if : ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }}
326
316
uses : ncipollo/release-action@v1
327
317
with :
328
- tag : v${{ steps.get_version.outputs.VERSION_TAG }}
329
- name : ' Session ${{ steps.get_version.outputs.VERSION_TAG }}'
330
- draft : true
331
- bodyFile : ${{ env.SHOULD_PUBLISH_ALPHA == 'true' && 'build/release-notes-alpha.md' || 'build/release-notes.md' }}
318
+ tag : v${{ needs.create_draft_release.outputs.version_tag }}
332
319
artifacts : ' dist/latest-mac.yml'
333
320
allowUpdates : true
334
- omitBodyDuringUpdate : true
335
321
omitNameDuringUpdate : true
322
+ omitBodyDuringUpdate : true
336
323
replacesArtifacts : true
337
324
updateOnlyUnreleased : true
0 commit comments