Prepare v0.0.1 #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Tauri | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
- "feature/**" | |
- "fix/**" | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- os: ubuntu-latest | |
arch: x86_64 | |
rust_target: x86_64-unknown-linux-gnu | |
- os: ubuntu-latest | |
arch: aarch64 | |
rust_target: aarch64-unknown-linux-gnu | |
- os: macos-latest | |
arch: x86_64 | |
rust_target: x86_64-apple-darwin | |
- os: macos-latest | |
arch: aarch64 | |
rust_target: aarch64-apple-darwin | |
- os: windows-latest | |
arch: x86_64 | |
rust_target: x86_64-pc-windows-msvc | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
- name: "Setup Rust" | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.config.rust_target }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.config.rust_target }} | |
- name: Install linux dependencies (ubuntu only) | |
if: matrix.config.os == 'ubuntu-latest' | |
run: | | |
sudo apt update | |
sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev | |
- name: Install dependencies | |
run: | | |
npm i -g [email protected] | |
make install | |
- name: Build | |
run: make build | |
- name: Archive AppImage | |
uses: actions/upload-artifact@v4 | |
if: matrix.config.os == 'ubuntu-latest' | |
with: | |
name: bewcloud-sync-linux-${{ matrix.config.arch }}-${{ github.sha }}-unsigned.AppImage | |
path: src-tauri/target/release/bundle/appimage/*.AppImage | |
if-no-files-found: error | |
- name: Archive deb | |
uses: actions/upload-artifact@v4 | |
if: matrix.config.os == 'ubuntu-latest' | |
with: | |
name: bewcloud-sync-linux-${{ matrix.config.arch }}-${{ github.sha }}-unsigned.deb | |
path: src-tauri/target/release/bundle/deb/*.deb | |
if-no-files-found: error | |
- name: Archive dmg | |
uses: actions/upload-artifact@v4 | |
if: matrix.config.os == 'macos-latest' | |
with: | |
name: bewcloud-sync-macos-${{ matrix.config.arch }}-${{ github.sha }}-unsigned.dmg | |
path: src-tauri/target/release/bundle/dmg/*.dmg | |
if-no-files-found: error | |
- name: Archive app | |
uses: actions/upload-artifact@v4 | |
if: matrix.config.os == 'macos-latest' | |
with: | |
name: bewcloud-sync-macos-${{ matrix.config.arch }}-${{ github.sha }}-unsigned.app | |
path: src-tauri/target/release/bundle/macos/*.app | |
if-no-files-found: error | |
- name: Archive msi | |
uses: actions/upload-artifact@v4 | |
if: matrix.config.os == 'windows-latest' | |
with: | |
name: bewcloud-sync-windows-${{ github.sha }}-unsigned.msi | |
path: src-tauri/target/release/bundle/msi/*.msi | |
if-no-files-found: error | |
- name: Archive exe | |
uses: actions/upload-artifact@v4 | |
if: matrix.config.os == 'windows-latest' | |
with: | |
name: bewcloud-sync-windows-${{ github.sha }}-unsigned.exe | |
path: src-tauri/target/release/bundle/nsis/*.exe | |
if-no-files-found: error |