Restore GitHub-hosted macOS release builds
Restore the release workflow from before the temporary laptop runner was introduced. The Apple Silicon build uses macos-latest again, and release publication continues to target GitHub and OpenArtifact.
Verified the workflow matches 04b5ebc byte for byte, validated the macOS matrix and publication job, and ran actionlint with its outdated Ubuntu 26.04 label check excluded.
This commit is contained in:
1 parent
e3a86aa9d3
commit
d72e8886d6
1 file changed
+1
-41
@@ -20,46 +20,8 @@ env:
|
|||||||
CARGO_NET_RETRY: "10"
|
CARGO_NET_RETRY: "10"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
macos-runner:
|
|
||||||
name: Select macOS runner
|
|
||||||
if: github.server_url == 'https://github.com'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions: {}
|
|
||||||
outputs:
|
|
||||||
labels: ${{ steps.select.outputs.labels }}
|
|
||||||
steps:
|
|
||||||
- id: select
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.MACOS_RUNNER_STATUS_TOKEN }}
|
|
||||||
USE_HOSTED: ${{ vars.MACOS_USE_HOSTED }}
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
labels='["self-hosted","macOS","ARM64"]'
|
|
||||||
if [[ "$USE_HOSTED" == "true" ]]; then
|
|
||||||
labels='["macos-latest"]'
|
|
||||||
elif [[ -n "$GH_TOKEN" ]]; then
|
|
||||||
# Listing repository runners requires Administration: read.
|
|
||||||
if ! available=$(gh api --paginate "repos/$GITHUB_REPOSITORY/actions/runners?per_page=100" \
|
|
||||||
--jq '.runners[] | select(.status == "online" and .busy == false) |
|
|
||||||
select((["self-hosted","macos","arm64"] - [.labels[].name | ascii_downcase]) == []) | .id'); then
|
|
||||||
echo "::warning::Unable to check self-hosted runners; using GitHub-hosted macOS"
|
|
||||||
available=""
|
|
||||||
fi
|
|
||||||
if [[ -z "$available" ]]; then
|
|
||||||
labels='["macos-latest"]'
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "::notice::Using self-hosted macOS. Set MACOS_RUNNER_STATUS_TOKEN for automatic fallback."
|
|
||||||
fi
|
|
||||||
echo "Selected $labels"
|
|
||||||
echo "labels=$labels" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: ${{ matrix.asset }}
|
name: ${{ matrix.asset }}
|
||||||
needs: macos-runner
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
if: ${{ github.server_url == 'https://github.com' }}
|
if: ${{ github.server_url == 'https://github.com' }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
@@ -93,7 +55,7 @@ jobs:
|
|||||||
deb: true
|
deb: true
|
||||||
deb_arch: armhf
|
deb_arch: armhf
|
||||||
pkg_arch: armv7h
|
pkg_arch: armv7h
|
||||||
- os: ${{ fromJSON(needs.macos-runner.outputs.labels) }}
|
- os: macos-latest
|
||||||
target: aarch64-apple-darwin
|
target: aarch64-apple-darwin
|
||||||
asset: tsunagi-macos-aarch64
|
asset: tsunagi-macos-aarch64
|
||||||
archive: tar.gz
|
archive: tar.gz
|
||||||
@@ -106,8 +68,6 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in new issue
Block a user