diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e4071cf8..01ff9d49c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,11 +14,8 @@ jobs: environment: release steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v22 + - uses: cachix/install-nix-action@v23 with: - # pin to nix-2.13 to workaround compability issue of 2.14, - # see: https://github.com/cachix/install-nix-action/issues/161 - install_url: https://releases.nixos.org/nix/nix-2.13.3/install nix_path: nixpkgs=channel:nixos-22.11 extra_nix_config: | access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} @@ -53,15 +50,15 @@ jobs: release-macos: # runs sequentially to avoid creating duplicated release needs: ["release"] - runs-on: macos-latest + strategy: + matrix: + runner: [macos-13, macos-14] + runs-on: ${{ matrix.runner }} environment: release steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v22 + - uses: cachix/install-nix-action@v23 with: - # pin to nix-2.13 to workaround compability issue of 2.14, - # see: https://github.com/cachix/install-nix-action/issues/161 - install_url: https://releases.nixos.org/nix/nix-2.13.3/install nix_path: nixpkgs=channel:nixos-22.11 extra_nix_config: | access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} @@ -95,10 +92,11 @@ jobs: done # update checksum and upload - sha256sum *.tar.gz > "checksums-darwin.txt" + CHKFILE="checksums-darwin-$(uname -p).txt" + sha256sum *.tar.gz > "$CHKFILE" echo 'FILES<> $GITHUB_ENV ls -1 *.tar.gz >> $GITHUB_ENV - echo "checksums-darwin.txt" >> $GITHUB_ENV + echo "$CHKFILE" >> $GITHUB_ENV echo 'EOF' >> $GITHUB_ENV cat $GITHUB_ENV - name: upload binaries diff --git a/scripts/release.sh b/scripts/release.sh index 8745a3f67..61d0f39b3 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -37,7 +37,11 @@ if [[ "$build_platform" == "x86_64-linux" ]]; then elif [[ "$build_platform" == "aarch64-linux" ]]; then hosts="Linux_arm64,native Linux_x86_64,gnu64 Windows_x86_64,mingwW64" elif [[ "$build_platform" == "x86_64-darwin" ]]; then - hosts="Darwin_x86_64,native Darwin_arm64,aarch64-darwin" + hosts="Darwin_x86_64,native" +elif [[ "$build_platform" == "aarch64-darwin" ]]; then + # cross compiling to x86_64-darwin from aarch64-darwin is not supported + # see: https://github.com/NixOS/nixpkgs/issues/180771 + hosts="Darwin_arm64,native" else echo "don't support build platform: $build_platform" exit 1