name: Silk on: push: branches: [main] pull_request: branches: [main, changeset-release/main] types: [opened, synchronize, reopened, closed] # Fork pull requests: runs in this repository's context, so it has secrets, # and is gated behind the fork-review environment's required reviewer. No # `closed` -- the close-issues phase is driven by pull_request alone. pull_request_target: branches: [main, changeset-release/main] types: [opened, synchronize, reopened] workflow_dispatch: inputs: dry_run: description: Run in dry-run mode type: boolean default: false snapshot: description: Publish a snapshot of the dispatched branch instead of running the release workflow type: boolean default: false snapshot_tag: description: Dist-tag (and version prefix) for a snapshot publish; never latest type: string default: next concurrency: # The event name keeps a fork push's pull_request and pull_request_target # runs in separate groups; sharing one would cancel one of them. # A snapshot dispatch gets its own group, so another dispatch on the same # commit (a dry-run release, say) cannot cancel it mid-publish. group: release-${{ github.event_name }}${{ inputs.snapshot && '-snapshot' || '' }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true jobs: workflow: name: Workflow uses: spencerbeggs/.github/.github/workflows/release.yml@main permissions: contents: write pull-requests: write id-token: write packages: write attestations: write checks: write artifact-metadata: write with: dry-run: ${{ inputs.dry_run || false }} # A snapshot dispatch runs silk-release-action's snapshot phase through the # reusable workflow's nested release-snapshot.yml; every other event takes # the normal release path. The id-token and packages grants above are what # that nested job needs for OIDC publishing and GitHub Packages. snapshot: ${{ inputs.snapshot || false }} snapshot-tag: ${{ inputs.snapshot_tag }} auto-merge: "squash" skip-claude-review: false # Fails the validation phase when the effected catalog has drifted from # the kit's next release versions, or when the committed plugin builds # lag their source: plugin:check runs pluginfinity build --check, then # diffs plugin/builds, which catches a validation build that already # rewrote them, then fails on untracked or staged paths git diff # cannot see. Exit-code only: the gates' own non-zero exit is the sole # failure signal; stderr is not inspected. on-build: pnpm catalog:check && pnpm plugin:check # Fork PRs wait on this environment's required reviewer before any run # touches secrets. The environment exists in repo settings; the # dispatcher refuses to proceed if it has no required reviewer. fork-review-environment: fork-review secrets: inherit