Skip to content

Commit 5d1a16d

Browse files
committed
Update cross-gem action
1 parent 6139a43 commit 5d1a16d

File tree

2 files changed

+27
-30
lines changed

2 files changed

+27
-30
lines changed

.github/workflows/build-gems.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,25 @@ jobs:
4040
steps:
4141
- uses: actions/checkout@v4
4242

43-
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
43+
- uses: ruby/setup-ruby@v1
4444
with:
4545
ruby-version: "3.4"
46-
bundler-cache: true
47-
cargo-cache: true
48-
cargo-vendor: true
49-
cache-version: v2-${{ matrix.ruby-platform }}
50-
51-
- name: Set vars
52-
id: vars
53-
run: |
54-
echo "rb-sys-version=$(bundle exec ruby -rrb_sys -e 'puts RbSys::VERSION')" >> $GITHUB_OUTPUT
5546

56-
- uses: oxidize-rb/cross-gem-action@main
47+
- uses: oxidize-rb/actions/cross-gem@v1
48+
id: cross-gem
5749
with:
58-
version: ${{ steps.vars.outputs.rb-sys-version }}
5950
platform: ${{ matrix.ruby-platform }}
60-
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ', ') }}
51+
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ',') }}
52+
53+
- uses: actions/upload-artifact@v4
54+
with:
55+
name: cross-gem-${{ matrix.ruby-platform }}
56+
path: ${{ steps.cross-gem.outputs.gem-path }}
57+
if-no-files-found: error
6158

6259
- name: Smoke gem install
6360
if: matrix.ruby-platform == 'x86_64-linux' # GitHub actions architecture
64-
run: bundle exec rake pkg:${{ matrix.ruby-platform }}:test
61+
run: bundle install && bundle exec rake pkg:${{ matrix.ruby-platform }}:test
6562

6663
source:
6764
name: Build source gem

.github/workflows/release.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,21 @@ jobs:
4040
steps:
4141
- uses: actions/checkout@v4
4242

43-
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
43+
- uses: ruby/setup-ruby@v1
4444
with:
45-
ruby-version: "3.3"
46-
bundler-cache: true
47-
cargo-cache: true
48-
cargo-vendor: true
49-
cache-version: v1-${{ matrix.ruby-platform }}
45+
ruby-version: "3.4"
5046

51-
- uses: oxidize-rb/cross-gem-action@main
47+
- uses: oxidize-rb/actions/cross-gem@v1
48+
id: cross-gem
5249
with:
53-
version: latest
5450
platform: ${{ matrix.ruby-platform }}
55-
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ', ') }}
51+
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ',') }}
52+
53+
- uses: actions/upload-artifact@v4
54+
with:
55+
name: cross-gem-${{ matrix.ruby-platform }}
56+
path: pkg/*-${{ matrix.ruby-platform }}.gem
57+
if-no-files-found: error
5658

5759
- name: Smoke gem install
5860
if: matrix.ruby-platform == 'x86_64-linux' # GitHub actions architecture
@@ -71,18 +73,16 @@ jobs:
7173

7274
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
7375
with:
74-
ruby-version: "3.3"
76+
ruby-version: "3.4"
7577
bundler-cache: true
7678
cargo-cache: true
7779
cache-version: v1
7880

79-
# It seems that v4 is not compatible with how artifacts are uploaded by
80-
# oxidize-rb/cross-gem-action. So this must stay as v3 until the issue
81-
# below is fixed.
82-
# See https://github.com/oxidize-rb/actions/issues/27, for more details.
83-
- uses: actions/download-artifact@v3
81+
- uses: actions/download-artifact@v4
8482
with:
85-
name: cross-gem
83+
pattern: cross-gem-*
84+
merge-multiple: true
85+
path: pkg/
8686

8787
- name: Package source gem
8888
run: bundle exec rake pkg:ruby

0 commit comments

Comments
 (0)