Skip to content

Commit

Permalink
CI: create separate artifacts for macos-{13,14,15}
Browse files Browse the repository at this point in the history
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 <akihiro.suda.cz@hco.ntt.co.jp>
  • Loading branch information
AkihiroSuda committed Oct 18, 2024
1 parent b33c40b commit 78c63ef
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ on:
- 'master'
env:
GO111MODULE: on
MACOS_LATEST_PRODUCT_VERSION: 15
permissions:
contents: read

jobs:
artifacts-darwin:
name: Artifacts Darwin
runs-on: macos-12
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
# When you update this list, make sure to update MACOS_LATEST_PRODUCT_VERSION too
runner: ["macos-13", "macos-14", "macos-15"]
timeout-minutes: 20
steps:
- name: "Show xcode and SDK version"
Expand All @@ -35,11 +41,23 @@ jobs:
with:
go-version: 1.23.x
- name: Make darwin artifacts
run: make artifacts-darwin
run: |
make artifacts-darwin
product_version="$(sw_vers --productVersion | cut -d. -f1)"
# Rename lima-VERSION-Darwin-arm64.tar.gz to lima-VERSION-Darwin-macOS15-arm64.tar.gz
for f in _artifacts/*; do
dst=${f/Darwin/Darwin-macOS${product_version}}
if [ ${product_version} = ${MACOS_LATEST_PRODUCT_VERSION} ]; then
# For the latest macOS release, preserve lima-VERSION-Darwin-arm64.tar.gz
cp -a "${f}" "${dst}"
else
mv "${f}" "${dst}"
fi
done
- name: "Upload artifacts"
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: artifacts-darwin
name: artifacts-darwin-${{ matrix.runner }}
path: _artifacts/
release:
# An old release of Ubuntu is chosen for glibc compatibility
Expand All @@ -56,7 +74,8 @@ jobs:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: artifacts-darwin
pattern: artifacts-darwin-*
merge-multiple: true
path: _artifacts/
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
Expand Down

0 comments on commit 78c63ef

Please sign in to comment.