Skip to content

Release script: one command from version to pushed tag #156

Closed

Description

@JacobStephens2

Parent

#150

What to build

The tracer bullet for #150. The maintainer runs the release script with a version and ends up with a pushed v<version> tag, which starts the existing dist release workflow.

The script:

  1. Works from origin/main in a temporary worktree, so the maintainer's checkout doesn't matter.
  2. Bumps the version in the manifest and lockfile, and nothing else, on a release-<version> branch.
  3. Pushes the branch and opens the bump PR into main.
  4. Waits for the PR's checks.
  5. Merges the PR with a merge commit.
  6. Tags that merge commit v<version> and pushes the tag.

For now the PR body is GitHub's generated notes for the PRs merged since the last tag, followed by the version diff, which the script writes. The notes sit inside the summary section, with the marker that the later agent summary (#159) and the Release page step will use. The script prints a progress line on stderr for each step (PR opened with its URL, waiting for CI, merged, tagged). It exits 0 once the tag is pushed.

If the PR's checks fail, the script stops before merging, leaves the PR open, says so and exits non-zero.

The README's Releasing section is rewritten around the one command. It keeps the existing description of what the tag then starts.

Acceptance criteria

  • Running the script with a version against a bare local origin opens a PR from release-<version> whose only change is the version in the manifest and lockfile.
  • The PR body has a clearly marked summary section holding GitHub's generated notes, followed by the version diff.
  • Once the checks pass, the PR is merged with a merge commit, v<version> points at that merge commit on origin, and the script exits 0.
  • Failing checks leave the PR open and unmerged with no tag, and the script exits non-zero with a message saying why.
  • Progress lines go to stderr, one for each step.
  • The maintainer's current branch and uncommitted changes neither affect the release nor are changed by it.
  • The fake gh serves the generate-notes API. The test runs the script as a black box against a bare origin, like the site deploy tests do, with the user's git config kept out.
  • The README's Releasing section describes the single command.

Blocked by

  • None (can start immediately)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions