Skip to content

ci(release): record every release as an empty commit on main#1394

Merged
pranav-new-relic merged 1 commit into
mainfrom
chore/release-notes-commit-to-main
Jul 13, 2026
Merged

ci(release): record every release as an empty commit on main#1394
pranav-new-relic merged 1 commit into
mainfrom
chore/release-notes-commit-to-main

Conversation

@pranav-new-relic

Copy link
Copy Markdown
Member

Summary

Extend the tag-triggered release workflow (`release.yml`) so that every published release also lands as a marker commit on `main`.

  • New job `commit-release-notes` runs after `build` (which creates the GitHub Release), so we can consume the release's canonical URL.
  • Subject: `chore(release): Open Install Library Release vX.Y.Z, D Month YYYY`
  • Body: the per-commit change list (`git log ..` in `- subject (short-sha)` form) plus a `Release: <html_url>` deep-link to the GitHub release page.
  • Empty commit — no changelog file is added (repo has none); `git log main` becomes the release history.
  • Uses `github-actions[bot]` via `${{ secrets.GITHUB_TOKEN }}`, matching existing automation identity.
  • One rebase-retry to survive a concurrent push to main.

Test plan

  • Push a throwaway pre-release tag (e.g. `v0.83.0-rc1`) after this merges and verify the new job runs, the `Commit message preview` step prints the expected format, and the empty commit appears on main.
  • If branch protection blocks the push, add `github-actions[bot]` to the "Allow specified actors to bypass required pull requests" list on the main branch protection rule (or swap `GITHUB_TOKEN` for a PAT stored as a repo secret).

Extend the tag-triggered release workflow with a new
`commit-release-notes` job that records each published
release as an empty commit on main. The commit's subject follows

  chore(release): Open Install Library Release vX.Y.Z, D Month YYYY

and its body carries the release contents (per-commit `- subject (short-sha)`
list, generated from `git log <prev>..<new>` between the just-released tag
and the immediately preceding v-tag) plus a `Release:` link to the GitHub
release page for one-click navigation.

The job runs after the existing `build` job (which creates the GitHub
Release), consumes its `html_url` output for the release link, uses the
default `github-actions[bot]` identity via `GITHUB_TOKEN`, and includes a
single rebase-and-retry to survive a concurrent push to main.

No changelog file is written (repo has no changelog); the commit message
itself is the release record on main.
@pranav-new-relic pranav-new-relic merged commit 0e567bd into main Jul 13, 2026
20 checks passed
@pranav-new-relic pranav-new-relic deleted the chore/release-notes-commit-to-main branch July 13, 2026 11:37
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