Skip to content

Consolidate auto-tag.yml + release.yml; drop PAT requirement - #2

Merged
dayglojesus merged 1 commit into
mainfrom
consolidate-release-workflow
May 23, 2026
Merged

Consolidate auto-tag.yml + release.yml; drop PAT requirement#2
dayglojesus merged 1 commit into
mainfrom
consolidate-release-workflow

Conversation

@dayglojesus

Copy link
Copy Markdown
Collaborator

Summary

Fold auto-tag.yml into release.yml so the entire release flow runs in one workflow triggered directly by edits to Applications/TextMate/about/Changes.md. Drops the chicken-and-egg PAT requirement.

Background

The previous two-workflow shape:

  1. auto-tag.yml — push to main → read Changes.md → push tag
  2. release.yml — push tag → build/sign/notarize/release

needed a PAT in the first workflow because tags pushed by GITHUB_TOKEN don't trigger downstream workflow runs (GitHub Actions anti-recursion safety). That's the only reason RELEASE_PAT was a required secret.

The cleaner pattern (e.g. dayglojesus/cloudsap's build-and-release.yml): a single workflow on push: branches: [main], paths: [<version-file>] does the version detect, the tag creation, and the release in sequence. gh release create v${VERSION} --target ${GITHUB_SHA} makes the tag and the release atomically — through ${{ github.token }}. No PAT, no secret to rotate.

What changes

  • Deleted .github/workflows/auto-tag.yml (60 lines).
  • .github/workflows/release.yml restructured:
    • on: push: branches: [main], paths: [Applications/TextMate/about/Changes.md] + workflow_dispatch.
    • Front-loaded steps: extract version from Changes.md → guard on -undead suffix → guard on tag-already-exists.
    • All heavy macos-14 steps (brew install, keychain import, configure, build, sign, notarize, staple, archive, release) gated on steps.tagcheck.outputs.should_release == 'true'. Non-undead Changes.md edits early-exit in seconds.
    • Final step: gh release create "v${VERSION}" --target "${GITHUB_SHA}" --title "TextMate ${VERSION}" --generate-notes "${ARCHIVE}".
    • GH_TOKEN: ${{ github.token }} — no PAT anywhere.

After this merges

The RELEASE_PAT repo secret can be deleted. Releases are cut by PRing a ## YYYY-MM-DD (vX.Y.Z-undead) block to the top of Changes.md and merging.

Test plan

  • Open a no-op PR that bumps Changes.md to a non--undead placeholder; merge to a fork branch; verify the workflow exits at the -undead guard without burning macos-14 minutes.
  • Subsequent -undead bump triggers full build/sign/notarize/release path.

The previous two-workflow shape (auto-tag.yml -> push tag -> release.yml)
needed a PAT because GITHUB_TOKEN-pushed tags don't trigger downstream
workflow runs (anti-recursion safety). Fold everything into a single
workflow triggered by:

- push to main touching Applications/TextMate/about/Changes.md
- workflow_dispatch

The workflow extracts the version from the top entry of Changes.md,
early-exits on non--undead versions, and skips when the tag already
exists. Only -undead releases gated past these checks pay for the
macos-14 minutes. The final step uses `gh release create v${VERSION}
--target ${GITHUB_SHA}` to create the tag + release atomically through
the default ${{ github.token }} — no PAT, no secret to rotate.

Resolves the chicken-and-egg requirement for RELEASE_PAT in repo secrets.
@dayglojesus
dayglojesus merged commit 4cc6e6f into main May 23, 2026
1 check passed
@dayglojesus
dayglojesus deleted the consolidate-release-workflow branch August 21, 2026 02:52
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