Skip to content

Commit 76be8ba

Browse files
committed
CI: create separate artifacts for macos-{13,14,15}
Now the following artifacts are created: - lima-VERSION-Darwin_macOS13-{arm64,x86_64}.tar.gz - lima-VERSION-Darwin_macOS14-{arm64,x86_64}.tar.gz - lima-VERSION-Darwin_macOS15-{arm64,x86_64}.tar.gz - lima-VERSION-Darwin-{arm64,x86_64}.tar.gz (identical to `*-Darwin_macOS15-*`) - lima-VERSION-Linux-{aarch64,x86_64}.tar.gz Fix issue 2753 Signed-off-by: Akihiro Suda <[email protected]>
1 parent b33c40b commit 76be8ba

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

.github/workflows/release.yml

+23-4
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,19 @@ on:
1313
- 'master'
1414
env:
1515
GO111MODULE: on
16+
MACOS_LATEST_PRODUCT_VERSION: 15
1617
permissions:
1718
contents: read
1819

1920
jobs:
2021
artifacts-darwin:
2122
name: Artifacts Darwin
22-
runs-on: macos-12
23+
runs-on: ${{ matrix.runner }}
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
# When you update this list, make sure to update MACOS_LATEST_PRODUCT_VERSION too
28+
runner: ["macos-13", "macos-14", "macos-15"]
2329
timeout-minutes: 20
2430
steps:
2531
- name: "Show xcode and SDK version"
@@ -35,11 +41,23 @@ jobs:
3541
with:
3642
go-version: 1.23.x
3743
- name: Make darwin artifacts
38-
run: make artifacts-darwin
44+
run: |
45+
make artifacts-darwin
46+
product_version="$(sw_vers --productVersion | cut -d. -f1)"
47+
# Rename lima-VERSION-Darwin-arm64.tar.gz to lima-VERSION-Darwin_macOS15-arm64.tar.gz
48+
for f in _artifacts/*; do
49+
dst=${f/Darwin/Darwin_macOS${product_version}}
50+
if [ ${product_version} = ${MACOS_LATEST_PRODUCT_VERSION} ]; then
51+
# For the latest macOS release, preserve lima-VERSION-Darwin-arm64.tar.gz
52+
cp -a "${f}" "${dst}"
53+
else
54+
mv "${f}" "${dst}"
55+
fi
56+
done
3957
- name: "Upload artifacts"
4058
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
4159
with:
42-
name: artifacts-darwin
60+
name: artifacts-darwin-${{ matrix.runner }}
4361
path: _artifacts/
4462
release:
4563
# An old release of Ubuntu is chosen for glibc compatibility
@@ -56,7 +74,8 @@ jobs:
5674
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
5775
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
5876
with:
59-
name: artifacts-darwin
77+
pattern: artifacts-darwin-*
78+
merge-multiple: true
6079
path: _artifacts/
6180
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
6281
with:

0 commit comments

Comments
 (0)