GitNexus/.github/workflows
Gergő Magyar 5b1f1aedf3 refactor(ci): unify release pipeline under publish.yml (#1610)
Collapse release-candidate.yml into publish.yml so there is exactly one workflow that publishes gitnexus to npm, creates GitHub Releases, and triggers Docker builds — for both release candidates and stable releases. Closes #1609 architecturally.

A first-stage `route` job classifies push-to-main / push-tag / workflow_dispatch into `rc` / `stable` modes and fails closed on malformed shapes. RC path runs rc-guard → ci.yml → publish (mint GitHub App token → checkout with persist-credentials:false → resolve next rc version → atomic v-tag + rc/<SHA> marker push → vtag integrity gate → npm publish via OIDC → GitHub prerelease → if: failure() cleanup) → docker.yml. Stable path verifies package.json matches the tag and publishes to `latest` via OIDC (no docker).

Hardening:

  • Self-trigger prevention via negative-glob `tags: ['v*', '!v*-rc.*']` — the bug class behind #1609 cannot recur.
  • Two distinct actions/checkout steps per mode (no conditional `token:` expression footgun).
  • Workflow-level `permissions: {}` deny-all + per-job grants; `id-token: write` only where OIDC is used.
  • npm Trusted Publishing replaces NPM_TOKEN (delete the secret after the first successful publish).
  • GitHub App installation token (actions/create-github-app-token@v3.2.0) replaces the long-lived RELEASE_PUSH_TOKEN PAT (delete after first successful RC).
  • vtag integrity gate fails closed on empty / mode-mismatched output (prevents Release named `main` from a github.ref fallback).
  • Annotation-injection sanitization on every logged ref.
  • Explicit `secrets:` passthrough on docker.yml (DOCKERHUB_USERNAME, DOCKERHUB_TOKEN); ci.yml no longer inherits anything.
  • `if: failure()` cleanup auto-deletes v-tag + rc-marker on partial failure (eliminates the external-consumer phantom-version ingestion window).
  • ACTIONS_STEP_DEBUG window closed via `set +x` wrap on the inline auth-header compute.
  • Curated retry-loud error handling on `gh api` bot-user-id lookup and `npx semver`.

Pre-merge validation:

  • 10-reviewer multi-agent code-review pass; 14 findings fixed inline (commit 820cefae), 6 deferred to follow-ups.
  • End-to-end dry-run rehearsal via workflow_dispatch (run 25919563064) validated route classification, rc-guard, App token mint, RC checkout, version resolver, vtag synthetic-regex check, and faithful tarball pack at the bumped version.
  • All zizmor findings on the unification commits closed.
  • Branch-protection required checks all green.

Post-merge actions:

  • After the first successful RC, delete the `NPM_TOKEN` and `RELEASE_PUSH_TOKEN` secrets — they are no longer used.
  • The first real RC after merge is the live-fire test for steps dry-run could not exercise (atomic tag push, real npm OIDC handshake, GitHub Release creation, docker.yml under explicit secrets passthrough). The if: failure() cleanup step handles the partial-failure recovery automatically; the Rollback Runbook in CONTRIBUTING.md covers the rare cases auto-cleanup can't reach.
2026-05-16 07:46:56 +01:00
..
ci-e2e.yml fix(security): Harden CI permissions (#1454) 2026-05-09 17:58:22 +01:00
ci-quality.yml fix(security): Harden CI permissions (#1454) 2026-05-09 17:58:22 +01:00
ci-report.yml ci: add fork-safe PR autofix pipeline (#1446) 2026-05-09 13:35:04 +01:00
ci-scope-parity.yml fix(security): Harden CI permissions (#1454) 2026-05-09 17:58:22 +01:00
ci-tests.yml fix(security): Harden CI permissions (#1454) 2026-05-09 17:58:22 +01:00
ci.yml refactor(ci): unify release pipeline under publish.yml (#1610) 2026-05-16 07:46:56 +01:00
claude.yml ci(claude): allow Bash in code-review job without interactive approval 2026-05-12 09:07:47 +01:00
codeql.yml fix(security): Harden CI permissions (#1454) 2026-05-09 17:58:22 +01:00
dependency-review.yml fix(security): Harden CI permissions (#1454) 2026-05-09 17:58:22 +01:00
docker.yml refactor(ci): unify release pipeline under publish.yml (#1610) 2026-05-16 07:46:56 +01:00
gitleaks.yml fix(security): Harden CI permissions (#1454) 2026-05-09 17:58:22 +01:00
pr-autofix-apply.yml chore(deps): bump actions/checkout from 5.0.0 to 6.0.2 (#1459) 2026-05-09 19:26:53 +01:00
pr-autofix-publish.yml feat(autofix): replace inline reviewdog with /autofix ChatOps button (#1458) 2026-05-09 16:32:38 +01:00
pr-autofix.yml fix(security): Pin Docker Node base images, remove runtime package-manager CVE surface, verify Trivy on PRs, and harden Dependabot policy (#1455) 2026-05-09 16:55:31 +01:00
pr-description-check.yml chore(deps): bump actions/github-script from 7.0.1 to 9.0.0 2026-04-15 20:17:08 +00:00
pr-labeler.yml fix(security): Harden CI permissions (#1454) 2026-05-09 17:58:22 +01:00
publish.yml refactor(ci): unify release pipeline under publish.yml (#1610) 2026-05-16 07:46:56 +01:00
scorecard.yml chore(deps): bump github/codeql-action from 3.35.3 to 4.35.3 (#1390) 2026-05-07 09:54:17 +01:00
tree-sitter-upgrade-readiness.yml chore(deps): tree-sitter 0.25 upgrade readiness monitor with daily Dependabot (#847) 2026-04-16 09:17:21 +01:00
triage-sweep.yml chore(deps): bump actions/cache from 5.0.4 to 5.0.5 (#840) 2026-04-15 13:36:38 +01:00
trivy.yml fix(security): Harden CI permissions (#1454) 2026-05-09 17:58:22 +01:00
workflow-lint.yml fix(security): Harden CI permissions (#1454) 2026-05-09 17:58:22 +01:00