ci: add release-please automation and cut 1.0.0 - #47
Conversation
Releases were entirely manual, and 1.0.0 -- which makes the driver work with modern Test Kitchen again -- is sitting unreleased on main while RubyGems still serves the broken 0.24.0. This adopts the same release-please setup the other test-kitchen drivers use, so merges to main open a release PR and merging that one tags the release and publishes the gem to RubyGems and GitHub Packages. The required PORTER_GITHUB_TOKEN, OWNER and RUBYGEMS_API_KEY secrets are already available to this repository at the organisation level. Taken from Corey Hemminger's earlier work in #36, with the action versions brought up to what kitchen-ec2 currently runs (release-please-action v5 and checkout v7 rather than v4). Two changes from the version kitchen-ec2 runs, both to avoid handing publishing credentials to code that can change underneath us: - Actions are pinned to commit SHAs rather than tags or branches. The two actionshub publish actions were referenced as @main, so whoever can push to those branches could change what runs with RUBYGEMS_API_KEY at any time. The version each SHA corresponds to is kept in a trailing comment, which is what Renovate reads to update them. - The workflow declares explicit permissions. This repository defaults workflow tokens to write, so without a permissions block the publish steps would run with a broadly scoped GITHUB_TOKEN. The manifest starts at 0.24.0, the last version actually published, and the Release-As footer below tells release-please to cut the next release as 1.0.0 to match the version already committed in cloudstack_version.rb and CHANGELOG.md. Release-As: 1.0.0 Co-authored-by: Corey Hemminger <hemminger@hotmail.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
9a31fcc to
a436ff5
Compare
|
Updated after a security review of the workflow. Two hardening changes from the version Pinned actions to commit SHAs. The two Added an explicit Verified Worth noting the same |
Why
Releases here are entirely manual, and it shows: RubyGems' latest
kitchen-cloudstackis0.24.0— the version that raisesNameError: uninitialized constant Kitchen::Driver::SSHBaseon load. The 1.0.0 that fixes it (#46) is sitting onmain, unreleased and invisible to every user.What this does
Adopts the same release-please setup the other test-kitchen drivers use. Merges to
mainopen a release PR; merging that PR tags the release and publishes to RubyGems and GitHub Packages.Built on @Stromweld's earlier work in #36, with the action versions brought up to what
kitchen-ec2currently runs —release-please-action@v5andcheckout@v7rather than v4/v4..github/workflows/publish.ymlkitchen-ec2release-please-config.jsonrelease-type: ruby, version filelib/kitchen/driver/cloudstack_version.rb.release-please-manifest.json0.24.0, the last actually-published version.github/CODEOWNERS@test-kitchen/maintainersHow 1.0.0 gets cut
The repo has no git tags, and #44/#46 weren't Conventional Commits, so release-please has nothing to infer a version from. The commit on this branch therefore carries a
Release-As: 1.0.0footer, which forces the next release to 1.0.0 — matching the version already committed incloudstack_version.rbandCHANGELOG.md.Because this repo squash-merges with
squash_merge_commit_message: COMMIT_MESSAGES, that footer survives intomain, and the workflow added here runs on the same push.Important
Please keep the
Release-As: 1.0.0line in the squash commit message when merging. Without it release-please won't cut a release.Note
release-please regenerates
CHANGELOG.md, so the release PR it opens may duplicate or reformat the hand-written 1.0.0 notes from #46. That release PR is editable — worth tidying the changelog there before merging it.Verified
yamllint -c .yamllint .— exit 0 across the repoPORTER_GITHUB_TOKEN,OWNER,RUBYGEMS_API_KEY) confirmed present as org-level secrets available to this repotest-kitchen/kitchen-ec2, which is on release-please todayCloses #36
🤖 Generated with Claude Code