Skip to content

ci: branch-protection-friendly release flow + unblock Dependabot PR #2#3

Merged
solracsf merged 2 commits intomainfrom
ci/release-flow-rework
Apr 27, 2026
Merged

ci: branch-protection-friendly release flow + unblock Dependabot PR #2#3
solracsf merged 2 commits intomainfrom
ci/release-flow-rework

Conversation

@solracsf
Copy link
Copy Markdown
Owner

@solracsf solracsf commented Apr 27, 2026

Summary

Two commits, each independently reviewable:

  1. ci: split release flow into prepare-PR + publish-on-merge — fixes the Publish Release workflow run that errored with GH013: Repository rule violations on git push origin main. Replaces the single-shot release.yml with a two-phase flow that respects the new branch ruleset (PR + 16/16 checks required) without introducing any new secret.
  2. ci: disable MD060 in markdownlint — unblocks Dependabot PR #2: markdownlint v0.40.0 (shipped by markdownlint-cli2-action v21) introduces MD060 table-column-style which fires 16 times against perfectly-rendered tables in README.md and .github/SECURITY.md. Disabling.

New release flow

Phase Workflow Trigger What it does
1 release-prepare.yml workflow_dispatch (manual) Bumps info.xml + CHANGELOG on release/vX.Y.Z branch, opens labeled PR, fires CI on the branch
2 release-publish.yml pull_request: closed (auto on PR merge with label release) or workflow_dispatch (recovery) Tags merge commit, builds tarball, publishes GH Release, verifies on CDN, signs + uploads to NC App Store

Why no PAT needed: GITHUB_TOKEN-pushed commits don't trigger downstream workflows (anti-loop), but workflow_dispatch is the documented exception. Phase 1 calls gh workflow run ci.yml --ref release/vX.Y.Z to fire CI on the prep PR's branch — the required-checks gate gets satisfied without a long-lived token.

Tag pushes are not covered by branch rulesets (which gate only refs/heads/*), so Phase 2 can git push origin vX.Y.Z directly.

User flow per release

  1. Click Run workflow on Release — Prepare PR → choose bump_type and prerelease
  2. Review and merge the PR (CI fires automatically on the release branch)
  3. Release — Publish fires on merge — tag, tarball, GitHub Release, CDN-verify, App Store upload happen automatically

Local validation

Check Result
actionlint -shellcheck="shellcheck -e SC2129,SC2002" exit 0
reuse lint 26 / 26 compliant
Workflow YAML structural sanity release-prepare + release-publish + ci + integration + update-inter-fonts

Test plan

  • CI passes on this PR (all 16 required checks)
  • After merge, click Release — Prepare PR → patch bump → confirm a release/vX.Y.Y+1 PR opens with CI running
  • Merge that release PR → confirm Release — Publish fires automatically and produces a GH Release + App Store post
  • Verify Dependabot PR chore(ci)(deps): bump the actions group across 1 directory with 2 updates #2 auto-rebases against the new main and goes green (MD060 disabled)

Branch protection on main requires every change to land via a PR
with all 16 required checks passing. The previous Publish Release
workflow did `git push origin main` directly, so it now hits
GH013 "Repository rule violations found for refs/heads/main".

Replacing the single-shot release.yml with two workflows that
respect branch protection AND keep zero-touch releases:

release-prepare.yml (manual workflow_dispatch)
- Computes new version, creates `release/vX.Y.Z` branch
- Bumps info.xml + CHANGELOG (same Keep-a-Changelog logic as before)
- Pushes the release branch (release/* is not a protected ref)
- Opens a PR labeled `release` with a body that encodes the
  prerelease flag in stable HTML-comment markers
- Manually fires ci.yml + integration.yml on the release branch
  via `gh workflow run` — workflow_dispatch is the documented
  exception to GITHUB_TOKEN's anti-loop rule
  (https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow),
  so the PR's required-checks gate gets satisfied without a PAT

release-publish.yml (auto on PR merge with `release` label,
or manual workflow_dispatch for retry)
- Reads the now-bumped version from main's info.xml
- Verifies tag does not exist
- Creates + pushes annotated tag (tags are not under branch rules)
- Builds release notes
- Builds the App Store tarball (same allowlist as the tarball
  dry-run job in integration.yml — they're meant to stay in sync)
- Publishes the GitHub Release
- Polls GitHub's CDN until gzip-valid + tar-valid + SHA-256 matches
- Signs the CDN-verified tarball and posts to the Nextcloud App Store

Supporting changes:
- ci.yml + integration.yml gain a `workflow_dispatch:` trigger so
  release-prepare can fire them on release/* branches
- The label `release` is created idempotently by release-prepare
- No new secrets needed; everything works with the built-in
  GITHUB_TOKEN

User flow per release:
  1. Click "Run workflow" on Release — Prepare PR
  2. Review and merge the PR (CI runs as on any PR)
  3. release-publish fires on merge — tag, tarball, GH release,
     CDN verify, App Store upload happen automatically

Validated locally: actionlint exit 0, REUSE 26/26 compliant.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
markdownlint v0.40.0 (shipped by markdownlint-cli2-action v21,
which Dependabot is bumping to in PR #2) introduces MD060
"table-column-style" — pads pipe characters with spaces to
visually align tables in source. This fires 16 times across
README.md and .github/SECURITY.md against tables that render
identically with or without padding.

Disabling the rule because:
- The rule is purely cosmetic; rendered tables look the same
- Auto-formatting every table in the repo to satisfy MD060 is
  significant churn for zero functional gain
- This unblocks Dependabot's PR #2 once main updates and the
  bot rebases

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@solracsf solracsf merged commit 3543d38 into main Apr 27, 2026
16 checks passed
@solracsf solracsf deleted the ci/release-flow-rework branch April 27, 2026 21:17
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.

1 participant