Repository navigation
Publish the smbcloud-email gem - #93
Conversation
Give sdk/gems/email the same treatment auth and model got in #91 so it can ship to RubyGems as a fat native gem. - Build with magnus 0.8 (0.7.1 does not compile on Ruby 4.0) and depend on smbcloud-email-sdk 0.7 instead of the 0.4 that no longer matches the crate. - Require rb_sys >= 0.9.130, which sets the darwin install name, and drop build.rs. - Cross-compile for four platforms and load the per-Ruby-minor extension with a fallback to the single-ABI path. - Stop packaging .ruby-version, a symlink that made the source gem uninstallable. - Remove the [patch.crates-io] path override from the gem workspace. It ships in the source gem and points outside it, so cargo fails on install. - Add the gem to release-sdk-gem.yml and to the version sync and drift checks. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
This change prepares the smbcloud-email gem for its first RubyGems release, aligning it with fixes previously applied to smbcloud-auth and smbcloud-model. It updates dependencies (magnus 0.8, smbcloud-email-sdk 0.7, rb_sys >= 0.9.130), removes problematic symlinks from the gem package, ensures correct cross-compilation for multiple platforms, and updates the loader logic in lib/email.rb to support per-Ruby-minor ABI bundles. The release workflow is updated to build and publish the email gem, and the version sync/drift scripts now cover the email gem's crate requirement. The Cargo.toml patch override is removed to allow proper resolution from crates.io. The Rust extension now uses the Ruby thread-safe exception constructors required by magnus 0.8. All changes are consistent with the description and prior review threads appear addressed.
Automated review by siGit Code Review · commit f612fd5 · see the review dashboard
Replace the RUBYGEMS_API_KEY secret with an OIDC exchange through rubygems/configure-rubygems-credentials. The push job gets id-token: write and the key is short lived. This also removes the problem of a scoped key refusing the first push of a new gem: smbcloud-email can use a pending trusted publisher instead. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
development moved gem PR checks out of release-sdk-gem.yml and into ci.yml (#92), so drop the sdk/gems path triggers from the release workflow and add the email gem to the ci.yml filter and the cross-build, smoke-test and source-gem matrices instead. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
This update extends the CI and release workflows to support the new smbcloud-email Ruby gem, aligning it with the fixes and patterns already applied to smbcloud-auth and smbcloud-model. The CI workflow now builds, cross-compiles, and smoke-tests all three gems (auth, model, email) for multiple platforms and Ruby versions, and validates the source gem file lists. The release workflow switches to RubyGems trusted publishing (OIDC) and documents the need for trusted publisher setup for each gem, including the new email gem. The changes are mostly additive, modularizing the gem jobs and ensuring robust checks for packaging and installation. No previous findings are reintroduced or made worse by these changes.
Automated review by siGit Code Review · commit 10c7579 · changes since f612fd5 · see the review dashboard
Gets
smbcloud-emailready for its first RubyGems release, using the same fixes #91 applied tosmbcloud-authandsmbcloud-model.What was wrong with the email gem:
ext/email/Cargo.tomlasked forsmbcloud-email-sdk = "0.4", but the crate is at 0.7.6..ruby-versionsymlink, so the source gem would not install.rb_sys ~> 0.9.91let darwin bundles get an empty install name.release-sdk-gem.yml.Changes:
smbcloud-email-sdk0.7, and theruby()helper inlib.rsfor the deprecated exception constructors. Clippy is clean.rb_sys >= 0.9.130,build.rsremoved,.ruby-versionand.rubocop.ymlleft out of the package.lib/email.rb.[patch.crates-io]path override fromsdk/gems/email/Cargo.toml. It ships in the source gem and points outside it, socargofailed duringgem install. Without it the gem resolvessmbcloud-email-sdkfrom crates.io like auth and model do.release-sdk-gem.ymlbuilds and pushes email, and waits forsmbcloud-email-sdkon crates.io. The version sync and drift scripts cover the email crate requirement.Checked locally:
rake build, then a sourcegem installinto a temp dir on Ruby 3.4.2 and 4.0.7.require "email"loads, the client builds, and a bad key raisesSmbCloud::Email::Error(401). The package has no symlinks.check-release-versions.mjsandactionlintpass.Pushing now uses RubyGems trusted publishing instead of the
RUBYGEMS_API_KEYsecret: the push job hasid-token: writeand callsrubygems/[email protected]. Before dispatching a release, someone who owns the gems has to register trusted publishers on rubygems.org forsmbcloudXYZ/smbcloud-cli, workflowrelease-sdk-gem.yml, no environment: one on each ofsmbcloud-authandsmbcloud-model, and a pending publisher forsmbcloud-email.To publish after merge, dispatch
SDK Ruby Gem Releasewithtag=v0.7.6,ref=development. auth and model 0.7.6 get skipped as already pushed.