ci: make macOS build optional, skip Homebrew tap if it fails
Some checks failed
Release / release (push) Has been cancelled
Some checks failed
Release / release (push) Has been cancelled
This commit is contained in:
parent
e0394a0a0f
commit
e831dd1eb1
1 changed files with 12 additions and 3 deletions
|
|
@ -40,13 +40,12 @@ jobs:
|
|||
cd src
|
||||
git checkout "${{ github.ref_name }}"
|
||||
|
||||
- name: Build release binaries and .deb
|
||||
- name: Build Linux release binary and .deb
|
||||
working-directory: src
|
||||
run: |
|
||||
VERSION=${{ github.ref_name }}
|
||||
mkdir -p dist
|
||||
|
||||
# Linux amd64 binary + .deb
|
||||
cargo build --release
|
||||
cargo deb --no-build
|
||||
cp target/debian/*.deb dist/
|
||||
|
|
@ -56,7 +55,13 @@ jobs:
|
|||
tar -czf "dist/resticview-${VERSION}-linux-amd64.tar.gz" -C "${STAGING}" resticview
|
||||
rm -rf "${STAGING}"
|
||||
|
||||
# macOS cross-compilation
|
||||
- name: Build macOS release binaries
|
||||
id: macos
|
||||
continue-on-error: true
|
||||
working-directory: src
|
||||
run: |
|
||||
VERSION=${{ github.ref_name }}
|
||||
|
||||
rustup target add x86_64-apple-darwin aarch64-apple-darwin
|
||||
cargo install cargo-zigbuild
|
||||
cargo zigbuild --release --target x86_64-apple-darwin
|
||||
|
|
@ -73,6 +78,9 @@ jobs:
|
|||
rm -rf "${STAGING}"
|
||||
done
|
||||
|
||||
- name: Print checksums
|
||||
working-directory: src
|
||||
run: |
|
||||
echo "=== SHA256 checksums ==="
|
||||
sha256sum dist/*
|
||||
|
||||
|
|
@ -123,6 +131,7 @@ jobs:
|
|||
done
|
||||
|
||||
- name: Update Homebrew tap
|
||||
if: steps.macos.outcome == 'success'
|
||||
working-directory: src
|
||||
run: |
|
||||
VERSION=${{ github.ref_name }}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue