@@ -25,30 +25,46 @@ jobs:
2525      - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8  #  v5.0.0
2626        with :
2727          fetch-depth : 0 
28+ 
29+       #  Vendor the attestation patch from rubygems/release-gem (no action execution)
30+       - name : Vendor release-gem patch 
31+         uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8  #  v5.0.0
32+         with :
33+           repository : rubygems/release-gem 
34+           ref : a25424ba2ba8b387abc8ef40807c2c85b96cbe32  #  v1.1.1
35+           path : .github/_release-gem 
36+ 
2837      - name : Install Bash 4+ and Kerberos 
2938        run : | 
3039          brew install bash 
3140          brew list krb5 &>/dev/null || brew install krb5 
3241          echo "/opt/homebrew/bin" >> $GITHUB_PATH 
42+ 
3343       - name : Cache build-tmp directory 
3444        uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809  #  v4.2.4
3545        with :
3646          path : ext/build-tmp-macos 
3747          key : build-tmp-${{ runner.os }}-${{ hashFiles('ext/*.sh', 'ext/Rakefile') }}-v2 
48+ 
3849      - name : Set up Ruby 
3950        uses : ruby/setup-ruby@3fee6763234110473bd57dd4595c5199fce2c510  #  v1.258.0
4051        with :
4152          ruby-version : ' 3.4' 
4253          bundler-cache : false 
54+ 
4355      - name : Build precompiled librdkafka for macOS ARM64 
4456        run : | 
4557          cd ext 
4658          /opt/homebrew/bin/bash ./build_macos_arm64.sh 
59+ 
4760       - name : Configure trusted publishing credentials 
4861        uses : rubygems/configure-rubygems-credentials@bc6dd217f8a4f919d6835fcfefd470ef821f5c44  #  v1.0.0
49-       - name : Build and push platform-specific gem 
62+ 
63+       - name : Build and push platform-specific gem (with Sigstore attestation) 
64+         env :
65+           RUBY_PLATFORM : ' arm64-darwin' 
66+           #  Preload the attestation patch so `gem push` generates & attaches the bundle
67+           RUBYOPT : " -r${{ github.workspace }}/.github/_release-gem/rubygems-attestation-patch.rb" 
5068        run : | 
5169          gem build *.gemspec 
5270          gem push *.gem 
53-          env :
54-           RUBY_PLATFORM : ' arm64-darwin' 
0 commit comments