Repository navigation
Adopt scientist-labs/rust-gem-release@v0 for releases - #3
Merged
Merged
Conversation
Migrate spellkit to the shared rust-gem-release reusable workflow so it publishes precompiled fat gems (arm64-darwin + x86_64-linux + aarch64-linux) alongside the source gem, instead of source-only. - .github/workflows/release.yml: thin caller pinned @v0 (tag-push + manual dispatch). publish defaults to DRY-RUN on workflow_dispatch and is gated on tag-push; rubygems-api-key maps to RUBYGEMS_API_KEY (empty token = no-op). - .github/workflows/build.yml: PR-CI caller @v0 (rake spec); replaces ci.yml. - .github/workflows/ci.yml: removed (superseded by build.yml). - lib/spellkit.rb: ABI require-shim — load versioned subdir lib/spellkit/<minor>/spellkit first, fall back to the flat path, so precompiled fat gems actually load. - spellkit.gemspec: ENV["RUST_GEM_PLATFORM"] platform branch so the platform gems clear extensions and ship the compiled bundles/.so. Proven template: red-candle 1.8.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Guard the dev-only rspec require so the Rakefile loads in the rb-sys-dock cross container (RUNTIME bundle only), and declare cross_compile + cross_platform on the rake-compiler ExtensionTask so the shared rust-gem-release matrix can build x86_64-linux / aarch64-linux / arm64-darwin precompiled gems. Caller: add a label-gated pull_request dry-run (types incl. labeled) so a PR labeled dry-run-release validates the full publish=false matrix before merge; gate the calling job on that label; make publish robust so a PR is never a publish (only push tags, or workflow_dispatch with inputs.publish). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
xrl
marked this pull request as ready for review
June 18, 2026 20:22
Retire the moving @v0 tag in favor of the explicit latest release. Updates both release.yml and build.yml callers and their doc comments. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adopt
scientist-labs/rust-gem-release@v0Migrates spellkit's release pipeline to the shared
scientist-labs/rust-gem-releasereusable workflow (pinned@v0, a moving major → currently rust-gem-release 0.2.0). Today spellkit ships source-only; after this the release publishes precompiled fat gems forarm64-darwin,x86_64-linux, andaarch64-linuxplus the source gem, with a GitHub Release attached.This is the generic (non-aliasing) adopter case:
gem-name == ext-name == gemspec basename == spellkit, soext-name/gemspec/platform-gem-envall resolve to their defaults and are omitted from the caller.Files changed
.github/workflows/release.yml(new) — thin caller pinned@v0. Triggers on tag-push (4 canonical patterns) andworkflow_dispatch.gem-name: spellkit,version-command: ruby -r./lib/spellkit/version -e 'print SpellKit::VERSION',permissions: contents: write..github/workflows/build.yml(new) — PR-CI caller@v0runningbundle exec rake spec. Supersedesci.yml..github/workflows/ci.yml(deleted) — hand-rolled PR-CI, replaced bybuild.yml.lib/spellkit.rb(prereq) — ABI require-shim.spellkit.gemspec(prereq) — env-gated platform branch.Prerequisites added (both were absent — required or the precompiled gems publish but fail to load)
lib/spellkit.rb. The old shim fell back torequire "spellkit.bundle", which never matches the darwin packaging pathlib/spellkit/<minor>/spellkit.bundle. Now loads the versioned subdir first (require "spellkit/#{minor}/spellkit"), then falls back to the flatspellkit/spellkitfor source/dev builds. Uses$LOAD_PATH(require, notrequire_relative).spellkit.gemspec. WhenENV["RUST_GEM_PLATFORM"]is set:spec.platform= that,spec.extensions = [], and the compiled*.bundle/*.soare added tospec.files. Otherwise the normal source-gemextensions = ["ext/spellkit/extconf.rb"]. Verified both modes load: source →extensions=["ext/spellkit/extconf.rb"], platform=ruby;RUST_GEM_PLATFORM=arm64-darwin→extensions=[], platform=arm64-darwin.Safety
publishdefaults to DRY-RUN onworkflow_dispatch(default: false) and is gated on tag-push (github.event_name == 'push' || inputs.publish).rubygems-api-keymaps tosecrets.RUBYGEMS_API_KEY; an empty/absent token is a clean no-op skip in the shared workflow (required: false).x86_64-cargo-config/darwin-verify-cmdneeded — spellkit's Rust deps (magnus, hashbrown, unicode-normalization, regex) are pure-CPU portable glibc builds; no TLS/Metal/CUDA/musl.Proven template
Mirrors red-candle 1.8.0, the capstone migration whose 4-platform release went green on this same
@v0workflow.DRAFT — do not merge until a
publish=falsedry-run is green; trigger with: