Skip to content

Commit 83c5635

Browse files
committed
feat: cut GitHub Release with curated collections zip on change
1 parent 7e87957 commit 83c5635

5 files changed

Lines changed: 48 additions & 2 deletions

File tree

.github/workflows/sync.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,39 @@ jobs:
3535
POSTMAN_API_KEY: ${{ secrets.POSTMAN_API_KEY }}
3636

3737
- name: Commit regenerated specs, collections and UID cache
38+
id: commit
3839
run: |
3940
git config user.name "github-actions[bot]"
4041
git config user.email "github-actions[bot]@users.noreply.github.com"
4142
git add specs collections collections.json
4243
if git diff --cached --quiet; then
4344
echo "No collection changes."
45+
echo "changed=false" >> "$GITHUB_OUTPUT"
4446
else
4547
git commit -m "sync: update collections from live OpenAPI spec"
4648
git push
49+
echo "changed=true" >> "$GITHUB_OUTPUT"
4750
fi
51+
52+
- name: Bundle collections and environment
53+
id: bundle
54+
if: steps.commit.outputs.changed == 'true' || (github.event_name == 'workflow_dispatch' && inputs.force)
55+
run: |
56+
tag="v$(date -u +'%Y.%m.%d-%H%M')"
57+
mkdir -p bundle
58+
cp collections/*.json environment/roxyapi.postman_environment.json bundle/
59+
(cd bundle && zip -q -j ../roxyapi-collections.zip ./*.json)
60+
echo "tag=$tag" >> "$GITHUB_OUTPUT"
61+
62+
- name: Publish release
63+
if: steps.bundle.outcome == 'success'
64+
uses: softprops/action-gh-release@v3
65+
with:
66+
tag_name: ${{ steps.bundle.outputs.tag }}
67+
name: Collections ${{ steps.bundle.outputs.tag }}
68+
body: |
69+
Postman collections for the RoxyAPI catalog, auto-generated from the live OpenAPI specs.
70+
71+
Import `roxyapi-collections.zip` into Postman (every domain plus a RoxyAPI environment), or fork the [public workspace](https://www.postman.com/roxylabs-7113570/roxyapi). Set the `apiKey` variable to your key and every request authenticates through `X-API-Key`.
72+
files: roxyapi-collections.zip
73+
make_latest: 'true'

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,8 @@ vite.config.js.timestamp-*
142142
vite.config.ts.timestamp-*
143143
.vite/
144144

145-
CLAUDE.md
145+
CLAUDE.md
146+
147+
# Release bundle build artifacts (assembled in CI, attached to the GitHub Release)
148+
/bundle/
149+
roxyapi-collections.zip

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ bun run check # biome lint and format
4343

4444
## Automation
4545

46-
`.github/workflows/sync.yml` runs daily at 06:00 UTC, on manual dispatch, and on a `repository_dispatch` of type `openapi-updated`. It runs the live sync and commits any regenerated artifacts. `.github/workflows/ci.yml` runs lint, typecheck, and a dry run on every PR.
46+
`.github/workflows/sync.yml` runs daily at 06:00 UTC, on manual dispatch, and on a `repository_dispatch` of type `openapi-updated`. It runs the live sync, commits any regenerated artifacts, and when collections changed it cuts a dated GitHub Release with `roxyapi-collections.zip` (the 12 collections plus `environment/roxyapi.postman_environment.json`). A manual dispatch with `force: true` rebuilds everything and always cuts a release, useful for an on demand snapshot. `.github/workflows/ci.yml` runs lint, typecheck, and a dry run on every PR.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Open the public workspace and fork any collection into your own:
2020

2121
Each forked collection carries its own `baseUrl` and an `apiKey` variable. Set `apiKey` to your key (from [your account](https://roxyapi.com/account)) and every request is authenticated through the `X-API-Key` header. That is the only setup.
2222

23+
Prefer to import locally? Grab `roxyapi-collections.zip` from the [latest release](https://github.com/RoxyAPI/postman-collections/releases/latest): every domain collection plus a ready to use RoxyAPI environment, refreshed automatically whenever the collections change. Import the zip into Postman, set `apiKey`, done.
24+
2325
Prefer Bruno or Insomnia? Both import RoxyAPI directly from a spec URL, no download needed:
2426

2527
```
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"id": "2b1a9c64-7e3f-4d52-8a6b-0c1d2e3f4a5b",
3+
"name": "RoxyAPI",
4+
"values": [
5+
{
6+
"key": "apiKey",
7+
"value": "",
8+
"type": "secret",
9+
"enabled": true
10+
}
11+
],
12+
"_postman_variable_scope": "environment",
13+
"_postman_exported_using": "RoxyAPI/postman-collections"
14+
}

0 commit comments

Comments
 (0)