From f54eb3bcc044150a848c850af8a45a101578360a Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Fri, 18 Oct 2024 17:23:37 +0900 Subject: [PATCH] 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 --- .github/workflows/release.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2eba31457d6..77ebf7c668f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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" @@ -35,7 +41,19 @@ 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: