一键导入
pre-release-branch
// Prepare release notes and open a pre-release PR for ignition-config-rs
// Prepare release notes and open a pre-release PR for ignition-config-rs
| name | pre-release-branch |
| description | Prepare release notes and open a pre-release PR for ignition-config-rs |
Prepares docs/release-notes.md for a new release and opens a PR:
pre-release-X.Y.Z branchgit and gh CLI installedmain# Prepare release 0.7.0
/pre-release-branch 0.7.0
# Specify the next upcoming version explicitly
/pre-release-branch 0.7.0 --next 0.8.0
The release version argument is required (e.g., 0.7.0).
RELEASE_VER = argument (e.g., "0.7.0")
RELEASE_MAJOR = 0
RELEASE_MINOR = 7
RELEASE_PATCH = 0
Determine the next upcoming version. If --next was provided, use that. Otherwise:
0.7.0 -> 0.8.0)0.6.1 -> 0.7.0)NEXT_VER = next version (e.g., "0.8.0")
TODAY = today's date in YYYY-MM-DD format
Verify:
git status --porcelain produces no outputmain branch: git branch --show-current returns maindocs/release-notes.md existsdocs/release-notes.md and look for a heading like:
## Upcoming ignition-config {RELEASE_VER} (unreleased)
If this heading does not exist, warn the user -- they may need to add it first, or the version may be wrong.If any check fails, stop and report the issue.
git checkout -b pre-release-{RELEASE_VER}
docs/release-notes.mdThe file follows this structure. Find the "Upcoming" heading and make two changes:
4a. Replace the "Upcoming" heading with a dated release heading:
Find:
## Upcoming ignition-config {RELEASE_VER} (unreleased)
Replace with:
## Upcoming ignition-config {NEXT_VER} (unreleased)
## ignition-config {RELEASE_VER} ({TODAY})
This inserts the new "Upcoming" header above, with two blank lines separating it from the now-dated release header.
4b. Keep all existing bullet points under the release header. Do not move or modify them -- they stay under the now-dated heading where they were.
git add docs/release-notes.md
git commit -m "docs/release-notes: update for release {RELEASE_VER}"
git push {UPSTREAM_REMOTE} pre-release-{RELEASE_VER}
Where {UPSTREAM_REMOTE} is typically origin. Verify with git remote -v if unsure.
Open a PR:
gh pr create \
--title "docs/release-notes: update for release {RELEASE_VER}" \
--body "$(cat <<'EOF'
## Summary
- Update release notes for {RELEASE_VER} release
- Add new "Upcoming {NEXT_VER}" section for next development cycle
Part of the release process for {RELEASE_VER}. See the [release checklist](https://github.com/coreos/ignition-config-rs/issues/new?labels=release&template=release-checklist.md).
EOF
)"
Summarize what was done:
cargo release on a release-{RELEASE_VER} branchFrom the release checklist, this skill covers:
git checkout -b pre-release-${RELEASE_VER}docs/release-notes.mdgit add docs/release-notes.md && git commit -m "docs/release-notes: update for release ${RELEASE_VER}"Cargo.toml for unintended dependency bound changescargo release step (separate branch, requires GPG).github/ISSUE_TEMPLATE/release-checklist.md.github/workflows/require-release-note.yml (PRs must modify docs/release-notes.md)f1244a5 (0.6.1), 40aea00 (0.6.0), f7ec268 (0.5.0), fdfff99 (0.4.1), 0693d30 (0.4.0)