also looking at this
fix(release): gate registry notification on final artifact checks
#305
6 files
+104
-14
| @@ -397,6 +397,12 @@ jobs: | ||
| 397 | 397 | gh release download "$TAG" --repo "$GITHUB_REPOSITORY" --pattern release-manifest.json --dir "$ARCHIVE_DIR/verified" |
| 398 | 398 | bun scripts/release-manifest.ts verify "$ARCHIVE_DIR" "$ARCHIVE_DIR/verified/release-manifest.json" |
| 399 | 399 | |
| 400 | notify-registry: | |
| 401 | name: notify registry after artifact verification | |
| 402 | needs: [verify-release, verify-macos-downloads, attach-release-sbom] | |
| 403 | runs-on: ubuntu-latest | |
| 404 | permissions: {} | |
| 405 | steps: | |
| 400 | 406 | # Tell the registry this version exists, with the token this workflow |
| 401 | 407 | # already holds to publish to it. |
| 402 | 408 | # |
| @@ -421,11 +427,14 @@ jobs: | ||
| 421 | 427 | exit 0 |
| 422 | 428 | fi |
| 423 | 429 | |
| 424 | code=$(curl -sS -o /tmp/index.out -w '%{http_code}' --max-time 30 \ | |
| 430 | if ! code=$(curl -sS -o /tmp/index.out -w '%{http_code}' --max-time 30 \ | |
| 425 | 431 | -X POST https://registry.pantry.dev/api/rebuild \ |
| 426 | 432 | -H "Authorization: Bearer $PANTRY_TOKEN" \ |
| 427 | 433 | -H 'Content-Type: application/json' \ |
| 428 | -d '{"domain":"craft-native.org"}') | |
| 434 | -d '{"domain":"craft-native.org"}'); then | |
| 435 | echo "::warning::Registry request failed — it will index this on its next sweep." | |
| 436 | exit 0 | |
| 437 | fi | |
| 429 | 438 | |
| 430 | 439 | if [ "$code" = "200" ]; then |
| 431 | 440 | echo "Registry notified: craft-native.org queued for indexing." |