@@ -15,18 +15,14 @@ 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}
29- platform=${platform/%-arm/-arm64}
22+ platform=${platform/macos-13/darwin-x64}
23+ platform=${platform/macos-14/darwin-arm64}
24+ platform=${platform/%.04/.04-x64}
25+ platform=${platform/%.04-arm/.04-arm64}
3026 echo "platform=$platform" >> $GITHUB_OUTPUT
3127 - name : Set ruby
3228 id : ruby
3632 ruby="ruby-$ruby"
3733 fi
3834 echo "ruby=$ruby" >> $GITHUB_OUTPUT
35+ echo "tag=$ruby" >> $GITHUB_OUTPUT
3936 echo "archive=$ruby-${{ steps.platform.outputs.platform }}.tar.gz" >> $GITHUB_OUTPUT
4037 - 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 }}'
38+ run : ' ! curl -s -L --head --fail https://github.com/ruby/ruby-builder/releases/download/${{ steps.ruby .outputs.tag }}/${{ steps.ruby.outputs.archive }}'
4239
4340 - name : Set NO_DOCUMENT
4441 run : |
@@ -120,7 +117,9 @@ jobs:
120117 env :
121118 GH_TOKEN : ${{ github.token }}
122119 GH_REPO : ${{ github.repository }}
123- run : gh release upload "toolcache" "${{ steps.ruby.outputs.archive }}"
120+ run : |
121+ gh release view "${{ steps.ruby.outputs.tag }}" || gh release create "${{ steps.ruby.outputs.tag }}" --notes "Builds of ${{ steps.ruby.outputs.ruby }}"
122+ gh release upload "${{ steps.ruby.outputs.tag }}" "${{ steps.ruby.outputs.archive }}"
124123
125124 buildJRubyWindows :
126125 if : false
@@ -132,17 +131,11 @@ jobs:
132131 runs-on : ${{ matrix.os }}
133132 steps :
134133 - 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
141134 - name : Set platform
142135 id : platform
143136 run : |
144137 platform=${{ matrix.os }}
145- platform=${platform/windows-2022/windows-latest }
138+ platform=${platform/windows-2022/windows-x64 }
146139 platform=${platform/windows-11-arm/windows-arm64}
147140 echo "platform=$platform" >> $GITHUB_OUTPUT
148141 shell : bash
@@ -151,10 +144,11 @@ jobs:
151144 run : |
152145 ruby=jruby-${{ matrix.jruby-version }}
153146 echo "ruby=$ruby" >> $GITHUB_OUTPUT
147+ echo "tag=$ruby" >> $GITHUB_OUTPUT
154148 echo "archive=$ruby-${{ steps.platform.outputs.platform }}.tar.gz" >> $GITHUB_OUTPUT
155149 shell : bash
156150 - 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 }}'
151+ run : ' ! curl -s -L --head --fail https://github.com/ruby/ruby-builder/releases/download/${{ steps.ruby .outputs.tag }}/${{ steps.ruby.outputs.archive }}'
158152 shell : bash
159153
160154 # JAVA_HOME_21_AARCH64 - https://github.com/actions/partner-runner-images/blob/main/images/arm-windows-11-image.md#java
@@ -212,7 +206,9 @@ jobs:
212206 env :
213207 GH_TOKEN : ${{ github.token }}
214208 GH_REPO : ${{ github.repository }}
215- run : gh release upload "toolcache" "${{ steps.ruby.outputs.archive }}"
209+ run : |
210+ gh release view "${{ steps.ruby.outputs.tag }}" || gh release create "${{ steps.ruby.outputs.tag }}" --notes "Builds of ${{ steps.ruby.outputs.ruby }}"
211+ gh release upload "${{ steps.ruby.outputs.tag }}" "${{ steps.ruby.outputs.archive }}"
216212
217213
218214 createPullRequest :
0 commit comments