Skip to content

Commit eee7cf3

Browse files
committed
Use specific OS versions and not -latest so the meaning does not change
* We want to build on the oldest version, but the filename should still be macos-latest/windows-latest for compatibility.
1 parent 4ece8fe commit eee7cf3

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
strategy:
5151
fail-fast: false
5252
matrix:
53-
os: [ ubuntu-18.04, ubuntu-20.04, macos-latest, windows-latest ]
53+
os: [ ubuntu-18.04, ubuntu-20.04, macos-10.15, windows-2019 ]
5454
runs-on: ${{ matrix.os }}
5555
steps:
5656
- uses: actions/download-artifact@v1
@@ -62,6 +62,14 @@ jobs:
6262
run: |
6363
upload_url=$(cat info/upload_url)
6464
echo "::set-output name=upload_url::$upload_url"
65+
- name: Set platform
66+
id: platform
67+
shell: bash
68+
run: |
69+
platform=${{ matrix.os }}
70+
platform=${platform/macos-*/macos-latest}
71+
platform=${platform/windows-*/windows-latest}
72+
echo "::set-output name=platform::$platform"
6573
6674
# Build
6775
- uses: actions/checkout@v2
@@ -104,7 +112,7 @@ jobs:
104112
# Create ruby.bat, so 'ruby' works in pwsh
105113
echo -en "@ECHO OFF\r\n@\"%~dp0jruby.exe\" %*\r\n" > ruby.bat
106114
- name: Create archive
107-
run: tar czf jruby-head-${{ matrix.os }}.tar.gz jruby-head
115+
run: tar czf jruby-head-${{ steps.platform.outputs.platform }}.tar.gz jruby-head
108116

109117
# Test
110118
- run: echo "$PWD/jruby-head/bin" >> $GITHUB_PATH
@@ -123,8 +131,8 @@ jobs:
123131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124132
with:
125133
upload_url: ${{ steps.upload_info.outputs.upload_url }}
126-
asset_path: jruby-head-${{ matrix.os }}.tar.gz
127-
asset_name: jruby-head-${{ matrix.os }}.tar.gz
134+
asset_path: jruby-head-${{ steps.platform.outputs.platform }}.tar.gz
135+
asset_name: jruby-head-${{ steps.platform.outputs.platform }}.tar.gz
128136
asset_content_type: application/gzip
129137

130138
metadata:

0 commit comments

Comments
 (0)