Skip to content

Commit

Permalink
Developing release scripts for windows Tauri
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatson committed Dec 3, 2023
1 parent a0fd71d commit 724691b
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 10 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- 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:
cargo tauri build --ci

- name: Build release
run:
cargo build --profile release-github
Expand All @@ -21,6 +37,8 @@ jobs:
body: This release and its artifacts were built with a GitHub action
files: |
target/release-github/rqbit.exe
desktop/src-tauri/target/release/bundle/msi/rqbit-desktop_1.0.0_x64_en-US.msi
desktop/src-tauri/target/release/bundle/nsis/rqbit-desktop_1.0.0_x64-setup.exe
cross-compile-on-macos:
runs-on: macos-11
Expand All @@ -31,6 +49,23 @@ jobs:
brew tap messense/macos-cross-toolchains &&
brew install x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu arm-unknown-linux-gnueabihf armv7-unknown-linux-gnueabihf

- 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 &&
cargo tauri build --target universal-apple-darwin --ci

- name: Make a directory for output artifacts
run:
mkdir -p target/artifacts
Expand Down Expand Up @@ -75,4 +110,5 @@ jobs:
target/artifacts/rqbit-linux-static-aarch64
target/artifacts/rqbit-linux-static-armv6
target/artifacts/rqbit-linux-static-armv7
desktop/src-tauri/target/universal-apple-darwin/release/bundle/dmg/rqbit-desktop_1.0.0_universal.dmg
4 changes: 2 additions & 2 deletions desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rqbit",
"private": true,
"version": "0.0.0",
"version": "4.0.0-beta.3",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -23,4 +23,4 @@
"typescript": "^5.0.2",
"vite": "^4.4.4"
}
}
}
10 changes: 5 additions & 5 deletions desktop/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "rqbit"
name = "rqbit-desktop"
version = "0.0.0"
description = "A Tauri App"
authors = ["you"]
Expand Down
4 changes: 2 additions & 2 deletions desktop/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"distDir": "../dist"
},
"package": {
"productName": "rqbit",
"version": "4.0.0-beta.3"
"productName": "rqbit-desktop",
"version": "1.0.0"
},
"tauri": {
"allowlist": {
Expand Down

0 comments on commit 724691b

Please sign in to comment.