Releases use RubyGems trusted publishing. No long-lived RubyGems API key belongs in GitHub secrets.
Before the first release, the RubyGems account that should own archunit must create a pending
trusted publisher with these exact values:
| Field | Value |
|---|---|
| Gem name | archunit |
| Repository owner | LukasNiessen |
| Repository name | ArchUnitRuby |
| Workflow filename | release.yml |
| Environment | release |
Create it from https://rubygems.org/profile/oidc/pending_trusted_publishers/new. After the first successful publication, RubyGems converts the pending publisher into the gem's trusted publisher and makes that RubyGems account an owner.
Preparation and publication are separate actions. A version commit, successful CI run, or strict
metadata check does not publish a gem. Do not dispatch Release for a dry run: its last step uploads
to RubyGems and creates the version tag. Keep publication behind explicit maintainer authorization.
- Update
ArchUnit::VERSIONinlib/archunit/version.rband add the release toCHANGELOG.md. - Refresh the local gem's
Gemfile.lockentry, date the changelog heading as## <version> - YYYY-MM-DD, and update the README installation example to~> <version>. - Ensure
mainis green and runbundle exec ruby scripts/check_release_metadata.rb --release. The development check permits an unreleased heading; the publishing check deliberately does not. - Run the
Releaseworkflow on themainbranch and enter the version without a leadingv. - The workflow verifies the version and release metadata, tests and lints the project, validates
documentation and the gem, publishes it, and creates and pushes the matching
v<version>tag. - Install the version from RubyGems in an empty gem home and run
require 'archunit'before announcing the release.
The workflow refuses to release from a branch other than main or when its version input differs
from ArchUnit::VERSION.
Use the pre-release checklist for the stable-version readiness gates.