Repository navigation
Publish releases to GitHub Packages automatically on version bump - #76
Jason Wells (jasonwells) wants to merge 7 commits into
Conversation
Adds the proposed publish workflow (agents can't write .github/workflows), restricts allowed_push_host to the patterninc GitHub Packages registry, and updates README, AGENTS.md, the release skill, CHANGELOG and ADR 0003. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qnLKR2P3W8yV9WHhmSnJA
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qnLKR2P3W8yV9WHhmSnJA
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qnLKR2P3W8yV9WHhmSnJA
There was a problem hiding this comment.
🟡 Changes recommended
The publish workflow uses a Ruby version unavailable on the current ubuntu-latest runner, causing it to fail before testing or publishing.
5 open issues
What changed in this PR
Moves query_helper gem publishing from rubygems.org to GitHub Packages, with releases triggered automatically by version changes merged to master. This PR does not bump the gem version.
Changes:
- Replaces tag-triggered publishing with a workflow that tests, builds, publishes, tags, and creates a GitHub release.
- Restricts the gem’s push destination to the
patternincGitHub Packages registry. - Updates installation instructions, release guidance, and architecture documentation.
| File | Description |
|---|---|
README.md |
Documents authenticated installation and automatic releases. |
query_helper.gemspec |
Restricts the allowed registry for publishing. |
docs/adr/README.md |
Adds the release architecture decision to the index. |
docs/adr/0003-publish-to-github-packages.md |
Records the registry migration and operational considerations. |
CHANGELOG.md |
Adds migration details and consumer upgrade notes. |
AGENTS.md |
Updates registry and release-process guidance. |
.github/workflows/publish_rubygems.yml |
Removes the previous tag-triggered publisher. |
.github/workflows/publish_github_packages.yml |
Adds automated package and GitHub release publishing. |
.agents/skills/release-gem/SKILL.md |
Aligns release preparation with publishing on merge. |
Review effort: Balanced
…eparate tag/release re-runs, correct package access docs Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qnLKR2P3W8yV9WHhmSnJA
Ruby 2.7 is end-of-life and unavailable on current runners; every app that uses the gem is on Ruby 3.3+. Bump faker (>= 2.0) and loosen the bundler dev dependency, regenerate Gemfile.lock (Rails 8.1, Bundler 2.5.22), and update the docs. No change to lib/. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qnLKR2P3W8yV9WHhmSnJA
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
| concurrent-ruby (1.3.8) | ||
| connection_pool (3.0.2) | ||
| crass (1.0.8) | ||
| diff-lcs (1.6.2) |
There was a problem hiding this comment.
Code library with Restrictive license
More Details
Code library diff-lcs version 1.6.2 has GPL-2.0-or-later license, categorized as Restrictive, its use may cause a supply chain licensing issue.
Remediation guidance
- Review the license terms to understand its specific rules.
- If needed, replace this component immediately with an alternative using a permissive license (e.g., MIT, Apache 2.0).
- Consult your legal team if the component is business-critical or the terms are unclear.
To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason
If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).
To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate
There was a problem hiding this comment.
Traced, not accepted yet. diff-lcs is a transitive development dependency of RSpec (rspec-expectations), used only to print spec failure diffs. It is not a dependency of the published gem: the gemspec's only runtime dependencies are activerecord and activesupport, so it doesn't ship to consumers. It was already in the lockfile on master (1.4.4); this PR only moved it to 1.6.2 when the lockfile was regenerated. It can't be removed without dropping RSpec. Leaving this thread open for a maintainer to decide whether to record a license exception for a dev-only dependency.
Generated by Claude Code
| logger | ||
| prism (>= 1.6.0) | ||
| tsort | ||
| rdoc (8.1.0) |
There was a problem hiding this comment.
Code library with Restrictive license
More Details
Code library rdoc version 8.1.0 has GPL-2.0-only license, categorized as Restrictive, its use may cause a supply chain licensing issue.
Remediation guidance
- Review the license terms to understand its specific rules.
- If needed, replace this component immediately with an alternative using a permissive license (e.g., MIT, Apache 2.0).
- Consult your legal team if the component is business-critical or the terms are unclear.
To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason
If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).
To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate
There was a problem hiding this comment.
Traced, not accepted yet. rdoc is new in the lockfile: it is required by irb, which comes in through the Rails development and test dependencies (railties, via the Rails 8 dev setup). It is not a dependency of the published gem: the gemspec's only runtime dependencies are activerecord and activesupport, so it doesn't ship to consumers. It can't be removed without dropping Rails' test tooling. Leaving this thread open for a maintainer to decide whether to record a license exception for a dev-only dependency.
Generated by Claude Code
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qnLKR2P3W8yV9WHhmSnJA
Adds gemfiles/rails_8_1.gemfile (+ lockfile) and a 2x2 matrix. A final 'test' job keeps the existing required-check name. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qnLKR2P3W8yV9WHhmSnJA



Summary
Moves gem releases from rubygems.org (manual tag push, broken since v1.0.0) to the
patternincGitHub Packages RubyGems registry, fully automatic, backfills the versions apps already pin, and moves CI to Ruby 3.3/3.4 with a Rails 8.0/8.1 matrix..github/workflows/publish_github_packages.ymlreplacespublish_rubygems.yml. When a merge tomasterchangeslib/query_helper/version.rb(or on manualworkflow_dispatch, master only), it runs the specs, builds the gem, pushes tohttps://rubygems.pkg.github.com/patterninc, then tagsvX.Y.Zand creates a GitHub release with the CHANGELOG section as notes. A version that already has a tag is not re-published, and a missing release is created on re-run. Uses the built-inGITHUB_TOKEN(contents: write,packages: write); noRUBYGEMS_API_KEY..github/workflows/backfill_github_packages.yml(manual, master only) publishes already-released tags (default:v0.3.2 v0.3.5 v0.3.6 v0.3.8 v0.4.1 v0.4.3 v0.4.4, the tags the patterninc apps pin) under each tag's own version number.ci.ymlruns the 66-example RSpec suite in four jobs. Rails 8.0 uses the rootGemfile; Rails 8.1 usesgemfiles/rails_8_1.gemfile(with its own lockfile). A final job namedtestdepends on the matrix, so a required check calledtestkeeps working. Previouslyubuntu-latest(now 26.04) had no Ruby 2.7.2 build, soci.ymlandbrakeman.ymlwere already failing on this branch, and 2.7 is end-of-life. Every app that uses the gem is on Ruby 3.3+ and Rails 8.x.actionpackandactivesupportare>= 8; the rootGemfileholds the lockfile at Rails 8.0 (~> 8.0.0);fakeris>= 2.0(1.9.x crashes on Ruby 3.2+, specs updated to its keyword API); thebundlerdev dependency is loosened;Gemfile.lockis regenerated (Bundler 2.5.22). No change tolib/. The runtime requirements (activerecord > 5, Ruby>= 2.6.0) are unchanged, but CI no longer exercises Rails older than 8.allowed_push_hostis set to the GitHub Packages registry so nothing is pushed to rubygems.org by accident.AGENTS.md, the release-gem skill, CHANGELOG (Unreleased) and ADR 0003.version.rb. This PR does not bump it, so merging it publishes nothing by itself.Things to know before merging
patternincmembers read access) and must never make it public (irreversible).read:packages. Other repos' Actions need the package's Manage Actions access (read) andpermissions: packages: read, or a token secret.bundle exec rspec specon Rails 8.0.5 and on Rails 8.1.4 (66 examples, 0 failures each) and Brakeman 5.4.1 (no warnings). Ruby 3.4 could not be installed in my environment, so its CI jobs are the first run. The publish and backfill workflows have not been run; the first real release is their test.Test plan
🤖 Generated with Claude Code
https://claude.ai/code/session_012qnLKR2P3W8yV9WHhmSnJA