Skip to content

Commit 3b67e1b

Browse files
authored
ci: publish bundled OpenAPI schemas as release assets (#1623)
1 parent 8a55476 commit 3b67e1b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,31 @@ jobs:
3737
needs: batch-deployment
3838
uses: ./.github/workflows/web-prod.yml
3939
secrets: inherit
40+
publish-openapi-schemas:
41+
name: Publish OpenAPI Schemas
42+
needs: api-deployment
43+
runs-on: ubuntu-latest
44+
permissions:
45+
contents: write
46+
steps:
47+
- name: Checkout code
48+
uses: actions/checkout@v4
49+
- name: Setup Node.js
50+
uses: actions/setup-node@v4
51+
with:
52+
node-version: 22
53+
- name: Bundle OpenAPI schemas
54+
run: |
55+
npx --yes @redocly/cli bundle docs/DatabaseCatalogAPI.yaml -o /tmp/DatabaseCatalogAPI.yaml
56+
npx --yes @redocly/cli bundle docs/DatabaseCatalogTokenAPI.yaml -o /tmp/DatabaseCatalogTokenAPI.yaml
57+
- name: Upload OpenAPI schemas as release assets
58+
env:
59+
GH_TOKEN: ${{ github.token }}
60+
run: |
61+
gh release upload ${{ github.event.release.tag_name }} \
62+
/tmp/DatabaseCatalogAPI.yaml \
63+
/tmp/DatabaseCatalogTokenAPI.yaml \
64+
--clobber
4065
notify-slack-on-failure:
4166
needs: [web-deployment, integration-tests]
4267
if: failure()

0 commit comments

Comments
 (0)