Skip to content

Commit fd5cb50

Browse files
committed
Upload with both new and old platform names
1 parent 4e17542 commit fd5cb50

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,13 @@ jobs:
151151
platform=${platform/macos-13/macos-latest}
152152
platform=${platform/macos-14/macos-13-arm64}
153153
platform=${platform/%-arm/-arm64}
154+
echo "old_platform=$platform" >> $GITHUB_OUTPUT
155+
156+
platform=${{ matrix.os }}
157+
platform=${platform/macos-13/darwin-x64}
158+
platform=${platform/macos-14/darwin-arm64}
159+
platform=${platform/%.04/.04-x64}
160+
platform=${platform/%.04-arm/.04-arm64}
154161
echo "platform=$platform" >> $GITHUB_OUTPUT
155162
156163
# Build
@@ -255,7 +262,12 @@ jobs:
255262
env:
256263
GH_TOKEN: ${{ github.token }}
257264
GH_REPO: ${{ github.repository }}
258-
run: gh release upload "${{ needs.release.outputs.tag }}" "ruby-${{ matrix.name }}-${{ steps.platform.outputs.platform }}.tar.gz"
265+
run: |
266+
gh release upload "${{ needs.release.outputs.tag }}" "ruby-${{ matrix.name }}-${{ steps.platform.outputs.platform }}.tar.gz"
267+
if [ "${{ steps.platform.outputs.old_platform }}" != "${{ steps.platform.outputs.platform }}" ]; then
268+
mv "ruby-${{ matrix.name }}-${{ steps.platform.outputs.platform }}.tar.gz" "ruby-${{ matrix.name }}-${{ steps.platform.outputs.old_platform }}.tar.gz"
269+
gh release upload "${{ needs.release.outputs.tag }}" "ruby-${{ matrix.name }}-${{ steps.platform.outputs.old_platform }}.tar.gz"
270+
fi
259271
260272
reuse-slow:
261273
needs: [prepare, release]

0 commit comments

Comments
 (0)