Skip to content

Commit bca02ed

Browse files
committed
Update build.yml to upload to the correct release and update README
1 parent 3272a23 commit bca02ed

File tree

2 files changed

+18
-25
lines changed

2 files changed

+18
-25
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,12 @@ jobs:
1515
runs-on: ${{ matrix.os }}
1616
steps:
1717
- uses: actions/checkout@v4
18-
- name: Set tag name
19-
id: info
20-
run: |
21-
tag=toolcache
22-
echo "tag=$tag" >> $GITHUB_OUTPUT
2318
- name: Set platform
2419
id: platform
2520
run: |
2621
platform=${{ matrix.os }}
27-
platform=${platform/macos-13/macos-latest}
28-
platform=${platform/macos-14/macos-13-arm64}
22+
platform=${platform/macos-13/darwin-x64}
23+
platform=${platform/macos-14/darwin-arm64}
2924
platform=${platform/%-arm/-arm64}
3025
echo "platform=$platform" >> $GITHUB_OUTPUT
3126
- name: Set ruby
@@ -36,9 +31,10 @@ jobs:
3631
ruby="ruby-$ruby"
3732
fi
3833
echo "ruby=$ruby" >> $GITHUB_OUTPUT
34+
echo "tag=$ruby" >> $GITHUB_OUTPUT
3935
echo "archive=$ruby-${{ steps.platform.outputs.platform }}.tar.gz" >> $GITHUB_OUTPUT
4036
- name: Check if already built
41-
run: '! curl -s -L --head --fail https://github.com/ruby/ruby-builder/releases/download/${{ steps.info.outputs.tag }}/${{ steps.ruby.outputs.archive }}'
37+
run: '! curl -s -L --head --fail https://github.com/ruby/ruby-builder/releases/download/${{ steps.ruby.outputs.tag }}/${{ steps.ruby.outputs.archive }}'
4238

4339
- name: Set NO_DOCUMENT
4440
run: |
@@ -120,7 +116,9 @@ jobs:
120116
env:
121117
GH_TOKEN: ${{ github.token }}
122118
GH_REPO: ${{ github.repository }}
123-
run: gh release upload "toolcache" "${{ steps.ruby.outputs.archive }}"
119+
run: |
120+
gh release view "${{ steps.ruby.outputs.tag }}" || gh release create "${{ steps.ruby.outputs.tag }}" --notes "Builds of ${{ steps.ruby.outputs.ruby }}"
121+
gh release upload "${{ steps.ruby.outputs.tag }}" "${{ steps.ruby.outputs.archive }}"
124122
125123
buildJRubyWindows:
126124
if: false
@@ -132,17 +130,11 @@ jobs:
132130
runs-on: ${{ matrix.os }}
133131
steps:
134132
- uses: actions/checkout@v4
135-
- name: Set tag name
136-
id: info
137-
run: |
138-
tag=toolcache
139-
echo "tag=$tag" >> $GITHUB_OUTPUT
140-
shell: bash
141133
- name: Set platform
142134
id: platform
143135
run: |
144136
platform=${{ matrix.os }}
145-
platform=${platform/windows-2022/windows-latest}
137+
platform=${platform/windows-2022/windows-x64}
146138
platform=${platform/windows-11-arm/windows-arm64}
147139
echo "platform=$platform" >> $GITHUB_OUTPUT
148140
shell: bash
@@ -151,10 +143,11 @@ jobs:
151143
run: |
152144
ruby=jruby-${{ matrix.jruby-version }}
153145
echo "ruby=$ruby" >> $GITHUB_OUTPUT
146+
echo "tag=$ruby" >> $GITHUB_OUTPUT
154147
echo "archive=$ruby-${{ steps.platform.outputs.platform }}.tar.gz" >> $GITHUB_OUTPUT
155148
shell: bash
156149
- name: Check if already built
157-
run: '! curl -s -L --head --fail https://github.com/ruby/ruby-builder/releases/download/${{ steps.info.outputs.tag }}/${{ steps.ruby.outputs.archive }}'
150+
run: '! curl -s -L --head --fail https://github.com/ruby/ruby-builder/releases/download/${{ steps.ruby.outputs.tag }}/${{ steps.ruby.outputs.archive }}'
158151
shell: bash
159152

160153
# JAVA_HOME_21_AARCH64 - https://github.com/actions/partner-runner-images/blob/main/images/arm-windows-11-image.md#java
@@ -212,7 +205,9 @@ jobs:
212205
env:
213206
GH_TOKEN: ${{ github.token }}
214207
GH_REPO: ${{ github.repository }}
215-
run: gh release upload "toolcache" "${{ steps.ruby.outputs.archive }}"
208+
run: |
209+
gh release view "${{ steps.ruby.outputs.tag }}" || gh release create "${{ steps.ruby.outputs.tag }}" --notes "Builds of ${{ steps.ruby.outputs.ruby }}"
210+
gh release upload "${{ steps.ruby.outputs.tag }}" "${{ steps.ruby.outputs.archive }}"
216211
217212
218213
createPullRequest:

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The action to use these prebuilt rubies is [ruby/setup-ruby](https://github.com/
66

77
Please report issues to [ruby/setup-ruby](https://github.com/ruby/setup-ruby).
88

9-
[The latest release](https://github.com/ruby/ruby-builder/releases/latest) contains all built Rubies.
9+
There is one release per `$engine-$version` holding the corresponding built Rubies for the various platforms.
1010

1111
## Building a new Ruby release
1212

@@ -27,11 +27,9 @@ Once it's ready, mark the release as non-prerelease and switch to it in `ruby/se
2727
## Naming
2828

2929
Archives are named `$engine-$version-$platform.tar.gz`.
30+
`$arch` is either `x64` or `arm64`
3031

3132
`platform` is one of:
32-
* `ubuntu-NN.NN`: built on the corresponding GitHub-hosted runner virtual environment
33-
* `macos-latest`: built on `macos-13`, the oldest `macos-amd64` available on GitHub-hosted runners.
34-
* `macos-13-arm64`: built on `macos-14`, the oldest `macos-arm64` available on GitHub-hosted runners.
35-
* `windows-latest`: built on `windows-2022` (does not matter, it's only for repacking a JRuby archive, no actual build)
36-
37-
The names contain `-latest` for compatibility, even though what `-latest` points to for runners might have changed.
33+
* `darwin-$arch`: built on the oldest macOS GitHub-hosted runner for that arch
34+
* `ubuntu-NN.NN-$arch`: built on the corresponding GitHub-hosted runner
35+
* `windows-$arch`: built on the oldest Windows GitHub-hosted runner for that arch

0 commit comments

Comments
 (0)