Skip to main content

Releasing the Gem

cm-admin is published to the private CM Gems registry via two manually dispatched GitHub workflows: a stable release from main and a beta release from beta.

Stable Release — release-cm-gem.yml​

Workflow name: Bump Gem to CM Gems Trigger: Manual (workflow_dispatch) — must run on the main branch

Input​

InputTypeOptionsDefaultDescription
bump_typechoicepatch, minor, majorpatchSemantic version segment to bump via gem-release

Pipeline​

build (main branch only)
├─ Checkout with MARVIN_GH_PAT
├─ Set up Ruby 3.4 + bundler cache
├─ gem install gem-release
├─ gem bump --version <bump_type> → updates lib/cm_admin/version.rb
├─ bundle install → refreshes Gemfile.lock
└─ Commit & push to main → "Add bundle files"

release (needs: build)
├─ Checkout + git pull
├─ gem build cm_admin.gemspec
├─ Read version from CmAdmin::VERSION → exposed as job output
└─ ./upload.sh $CM_GEMS_PASSWORD $CM_GEMS_HOST

changelog (needs: release)
└─ Calls changelog-release.yml with version=v<version>
→ AI release notes, GitHub Release, docs update, Slack notification
(see Release Changelog & Notifications)

Secrets & Variables​

NameKindPurpose
MARVIN_GH_PATsecretCheckout and push version-bump commits
CM_GEMS_PASSWORDvarPassword for the private gem host
CM_GEMS_HOSTvarHostname of the private gem registry
OPENROUTER_API_KEY, SLACK_WEBHOOK_URLsecretPassed through to the changelog workflow

Beta Release — release-beta-gem.yml​

Workflow name: Release Beta Version to CM Gems Trigger: Manual (workflow_dispatch) — must run on the beta branch

How Beta Versioning Works​

  1. Reads the base version from CmAdmin::VERSION and strips any existing .beta suffix
  2. Counts existing git tags matching v<base>.beta* to determine the next beta number
  3. Writes <base>.beta<N> into lib/cm_admin/version.rb (e.g. 7.2.26.beta1, 7.2.26.beta2, …)
  4. Commits the version bump to beta, builds the gem, and pushes to CM Gems
  5. Creates a GitHub pre-release tag v<base>.beta<N> via softprops/action-gh-release

Beta releases do not trigger the changelog workflow — they are pre-releases for testing only.

Notes​

  • Both workflows abort early if dispatched from the wrong branch (main / beta respectively)
  • bundle config set frozen false is set before bundle install so Gemfile.lock can be updated during the bump
  • The stable release's changelog step runs after the gem is pushed, so a changelog failure never blocks the gem publish