-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve: generate and publish openapi spec in release #3674
Conversation
should we also have the latest always be saved as openapi3.json? So it always creates openapi-version.json and openapi.json. openapi.json just gets overwritten each time. |
.github/workflows/cd-binaries.yaml
Outdated
@@ -62,7 +64,7 @@ jobs: | |||
- run: | | |||
# fail fast if the release does not exist | |||
gh release view v${{ needs.prepare.outputs.release-name }} || exit 1 | |||
gh release upload v${{ needs.prepare.outputs.release-name }} *.txt *.zip *.deb *.rpm | |||
gh release upload v${{ needs.prepare.outputs.release-name }} *.txt *.zip *.deb *.rpm *.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be more specific of the json file we are uploading? The zip, rpm, and deb files are all clearly built things, but a JSON file could be used elsewhere (ex: some kind of configuration file). It seems this is scoped to output from the build steps though so maybe its ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matching the openapi-*.json
pattern might be good so that it documents which file we are expecting to upload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
.github/workflows/cd-binaries.yaml
Outdated
@@ -62,7 +64,7 @@ jobs: | |||
- run: | | |||
# fail fast if the release does not exist | |||
gh release view v${{ needs.prepare.outputs.release-name }} || exit 1 | |||
gh release upload v${{ needs.prepare.outputs.release-name }} *.txt *.zip *.deb *.rpm | |||
gh release upload v${{ needs.prepare.outputs.release-name }} *.txt *.zip *.deb *.rpm *.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matching the openapi-*.json
pattern might be good so that it documents which file we are expecting to upload.
6302057
to
0cdf68c
Compare
Not as part of the release. This generates the spec just in time to archive it as part of the release. To maintain an ongoing |
Summary
Generate the OpenAPI spec and publish it as part of the release.