Skip to content

feat(ci): allow the release pipeline to be rehearsed without publishing - #798

Merged
oc-tmueller merged 1 commit into
masterfrom
feat/release-dry-run
Sep 23, 2026
Merged

oc-tmueller merged 1 commit into
masterfrom
feat/release-dry-run

Conversation

@oc-tmueller

Copy link
Copy Markdown
Contributor

Why

The release workflow has never executed. No tag has been pushed since it landed in
#793, so the first run would be the real v1.6.0 tag — a poor place to discover that
ocsign won't build, that a signing secret is malformed, or that make dist behaves
differently on ubuntu-latest than in a local container.

The reusable workflow already takes a dry-run input that skips the tag check and the
release creation and uploads the tarball as a workflow artifact instead. Nothing in the
org has ever used it
— all ten release.yml callers I checked are tag-push only, so it
was unreachable here.

What

Adds workflow_dispatch and derives dry-run from the ref:

dry-run: ${{ github.event_name != 'push' || !startsWith(github.ref, 'refs/tags/v') }}

Written as the positive invariant "only a push of a v-tag publishes" rather than
event_name == 'workflow_dispatch', so a trigger added here later cannot inherit
real-release behaviour by default — a push: branches: ['v*'] would otherwise publish a
release from a branch head. Truth table:

trigger dry-run result
push refs/tags/v1.6.0 false publishes
dispatch on a branch true dry run
dispatch on a v-tag true dry run
hypothetical push: branches: ['v*'] true dry run

inputs.dry-run is deliberately not used: on a tag push the inputs context is empty,
and passing '' to the callee's boolean input is an error.

What a rehearsal actually exercises

From the callee, only two steps are gated by dry-run — "Verify tag matches
appinfo/info.xml" and "Create GitHub Release". Everything else runs:

  • "Check signing secrets are present" is not gated, so the secret plumbing is tested
  • ocsign checkout at the pinned SHA and Go build
  • make dist CAN_SIGN=true sign="ocsign …" on ubuntu-latest
  • the signature assertions — appinfo/signature.json present, schema v2, leaf CN equals
    the app id
  • the development-files assertion
  • actions/upload-artifact with if-no-files-found: error, so an empty glob fails the job

Scope — this is convenience, not a privilege boundary

Called out in a comment so nobody mistakes it for a control. workflow_dispatch reads the
workflow from the ref it runs against, so a branch can set dry-run itself; and the callee
writes the signing key to the runner before make dist executes ref-controlled code,
dry run or not. A v* tag push already grants exactly that — there is no tag ruleset on
this repo — so this adds no reach. If that ever needs to change, the fix is an
environment with required reviewers around the key, not this trigger.

Notes

  • workflow_dispatch is only offered once the trigger is on the default branch, so this
    branch cannot rehearse itself
    — the first rehearsal is possible after merge.
  • contacts would be the first caller in the org to exercise the callee's dry-run path
    (the reusable repo's own test.yml only passes the literal dry-run: true), so a
    failure may be in that previously unexercised branch rather than here.
  • A rehearsal is not fully reproducible, which limits what a green run proves: make composer runs composer update and package.json's prebuild runs npm update && bower update, so a rehearsal today and the real tag next week can vendor different
    code. Pre-existing and out of scope here, but worth knowing.

The release workflow has never executed: no tag has been pushed since it
landed in #793. The first run would therefore be the real v1.6.0 tag,
which is a poor place to find out that ocsign will not build, that a
signing secret is malformed, or that `make dist` behaves differently on
ubuntu-latest than in a local container.

The reusable workflow already takes a `dry-run` input that skips the
tag-vs-info.xml check and the release creation and uploads the tarball as
a workflow artifact instead, but nothing in the org has ever used it -
every release.yml caller is tag-push only, so it was unreachable here.

Adds workflow_dispatch and derives dry-run from the ref. The condition is
written as the positive invariant "only a push of a v-tag publishes"
rather than "a dispatch is a dry run", so that a trigger added here later
cannot inherit real-release behaviour by default: a `push: branches:
['v*']` would otherwise publish a release from a branch head. A dispatch
never publishes, including a dispatch against a tag. A v-tag push is
unaffected.

inputs.dry-run is not used because on a tag push the inputs context is
empty, and passing '' to the callee's boolean input is an error.

What a dispatch then exercises, per the callee: the signing-secret
presence check (not gated by dry-run), the ocsign build, `make dist` with
CAN_SIGN, the schema-v2 / leaf-CN signature assertions, and the
development-files assertion. Only the tag check and release creation are
skipped.

Note that workflow_dispatch is only offered once the trigger is on the
default branch, so the first rehearsal is possible after this merges -
this branch cannot rehearse itself.

Signed-off-by: Thomas Müller <[email protected]>
@oc-tmueller
oc-tmueller requested a review from a team as a code owner September 23, 2026 09:46
@oc-tmueller

Copy link
Copy Markdown
Contributor Author

@phil-davis

@oc-tmueller
oc-tmueller merged commit 504f129 into master Sep 23, 2026
12 checks passed
@oc-tmueller
oc-tmueller deleted the feat/release-dry-run branch September 23, 2026 10:11
@oc-tmueller oc-tmueller mentioned this pull request Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants