Skip to content

Conversation

@retorted
Copy link

@retorted retorted commented Sep 8, 2025

Adds a GH workflow to automatically compile and push native gem versions for x86_64-linux and arm64-darwin when a tag is pushed.

Setup

  • Merge the PR (I think workflows only become active after they're merged to main)
  • Add RUBYGEMS_API_KEY to github secrets for the repo

Usage

  • Prep a release version, eg: 0.2.1
  • Build and publish the regular version of the gem in whatever way you do it now
  • Create and push a new tag, eg: git tag -a 0.2.1 && git push origin 0.2.1
  • The workflow should run jobs to create native versions of the gem(s) and push them to rubygems automatically

Notes

  • I initially tried using the docker-based setup provided by oxide-rb but ran into various issues here for reference.
  • There are some annoying formatting issues around building for Darwin at the moment; when invoking the task you have to specify the Darwin version in a suffix without a hyphen, eg rake native:arm64-darwin23, the output of that task creates a file with a hyphenated suffix (*-arm64-darwin-23.gem) but apparently the suffix is basically pointless and should be stripped out before publishing, eg *-arm64-darwin.gem. Related discussion here: Make no distinction between arm64-darwin-{21,22,23} ruby/rubygems#7407

Signed-off-by: retorted <201078195+retorted@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant