Docker cross-compilation github workflow.

This commit is contained in:
Igor Katson 2024-08-26 21:09:00 +01:00
parent 01a4f68e20
commit 11d230f95a
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
8 changed files with 270 additions and 154 deletions

49
.github/workflows/release-osx.yml vendored Normal file
View file

@ -0,0 +1,49 @@
name: Release binaries for OSX
on:
push:
tags:
- "v*.*.*"
env:
CARGO_TERM_COLOR: always
jobs:
release-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: install Tauri
run: cargo install tauri-cli --profile dev
- name: npm install (desktop)
working-directory: desktop
run: npm install
- name: npm install (librqbit/webui)
working-directory: crates/librqbit/webui
run: npm install
- name: cargo tauri build
working-directory: desktop
run:
rustup target add aarch64-apple-darwin && rustup target add x86_64-apple-darwin &&
cargo tauri build --target universal-apple-darwin --ci
- uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
desktop/src-tauri/target/universal-apple-darwin/release/bundle/dmg/rqbit-desktop_*_universal.dmg
- name: Make a directory for output artifacts
run: mkdir -p target/artifacts
- name: Build release OSX universal binary
run: rustup target install aarch64-apple-darwin &&
cargo build --profile release-github --target x86_64-apple-darwin &&
cargo build --profile release-github --target aarch64-apple-darwin &&
lipo ./target/x86_64-apple-darwin/release-github/rqbit ./target/aarch64-apple-darwin/release-github/rqbit -create -output ./target/artifacts/rqbit-osx-universal
- uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
target/artifacts/rqbit-osx-universal