Skip to content

Commit 876b641

Browse files
committed
Upload with both new and old platform names
1 parent e559d1c commit 876b641

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,14 @@ jobs:
9595
platform=${platform/macos-13/macos-latest}
9696
platform=${platform/macos-14/macos-13-arm64}
9797
platform=${platform/%-arm/-arm64}
98-
echo "platform=$platform" >> $GITHUB_OUTPUT
98+
echo "old_platform=$platform" >> $GITHUB_OUTPUT
9999
100+
platform=${{ matrix.os }}
101+
platform=${platform/macos-13/darwin-x64}
102+
platform=${platform/macos-14/darwin-arm64}
103+
platform=${platform/%.04/.04-x64}
104+
platform=${platform/%.04-arm/.04-arm64}
105+
echo "platform=$platform" >> $GITHUB_OUTPUT
100106
# Build
101107
- name: Setup system ruby
102108
uses: ruby/setup-ruby@master
@@ -157,7 +163,12 @@ jobs:
157163
env:
158164
GH_TOKEN: ${{ github.token }}
159165
GH_REPO: ${{ github.repository }}
160-
run: gh release upload "${{ needs.release.outputs.tag }}" "truffleruby${{ matrix.name }}-${{ steps.platform.outputs.platform }}.tar.gz"
166+
run: |
167+
gh release upload "${{ needs.release.outputs.tag }}" "truffleruby${{ matrix.name }}-${{ steps.platform.outputs.platform }}.tar.gz"
168+
if [ "${{ steps.platform.outputs.old_platform }}" != "${{ steps.platform.outputs.platform }}" ]; then
169+
mv "truffleruby${{ matrix.name }}-${{ steps.platform.outputs.platform }}.tar.gz" "truffleruby${{ matrix.name }}-${{ steps.platform.outputs.old_platform }}.tar.gz"
170+
gh release upload "${{ needs.release.outputs.tag }}" "truffleruby${{ matrix.name }}-${{ steps.platform.outputs.old_platform }}.tar.gz"
171+
fi
161172
162173
publish:
163174
name: Publish Release

0 commit comments

Comments
 (0)