Skip to content

Commit ba914b8

Browse files
committed
Generate a schema as part of each release
Signed-off-by: itowlson <[email protected]>
1 parent e378d29 commit ba914b8

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
extraArgs: "--features openssl/vendored",
3535
target: "",
3636
targetDir: "target/release",
37+
generateManifestSchema: true,
3738
}
3839
- {
3940
os: "ubuntu-22.04",
@@ -132,6 +133,10 @@ jobs:
132133
--output-signature spin.sig \
133134
${{ matrix.config.targetDir }}/spin${{ matrix.config.extension }}
134135
136+
- name: Generate manifest schema
137+
if: matrix.config.generateManifestSchema
138+
run: ${{ matrix.config.targetDir }}/spin${{ matrix.config.extension }} maintenance generate-manifest-schema -o manifest.schema.json
139+
135140
- name: package release assets
136141
if: runner.os != 'Windows'
137142
shell: bash
@@ -167,6 +172,13 @@ jobs:
167172
with:
168173
name: spin-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}
169174
path: _dist/spin-${{ env.RELEASE_VERSION }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.zip
175+
176+
- name: Upload schema as GitHub artifact
177+
if: matrix.config.generateManifestSchema
178+
uses: actions/upload-artifact@v4
179+
with:
180+
name: manifest.schema.json
181+
path: manifest.schema.json
170182

171183
checksums:
172184
name: generate release checksums
@@ -206,13 +218,20 @@ jobs:
206218
steps:
207219
- uses: actions/checkout@v3
208220

209-
- name: download release assets
221+
- name: download binaries for release assets
210222
uses: actions/download-artifact@v4
211223
with:
212224
pattern: spin-*
213225
path: _dist
214226
merge-multiple: true
215227

228+
- name: download schema for release assets
229+
uses: actions/download-artifact@v4
230+
with:
231+
pattern: manifest.schema.json
232+
path: _dist
233+
merge-multiple: true
234+
216235
- name: check if pre-release
217236
shell: bash
218237
run: |

0 commit comments

Comments
 (0)