Merge pull request #83 from edayot/main #384
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 of your github action | |
name: Build Nightly | |
# this will help you specify where to run | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
# this will run on the electron branch | |
- main | |
# this is where the magic happens, each job happens in parallel btw | |
jobs: | |
publish: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache Cargo Deps | |
id: cache-cargo-deps | |
uses: actions/cache@v3 | |
with: | |
path: | | |
platforms/desktop/src-tauri/target/release | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Use Node.js | |
uses: actions/setup-node@v3.5.1 | |
with: | |
cache: "npm" | |
node-version: 18 | |
- name: Setup Rust environment | |
# You may pin to the exact commit or the version. | |
# uses: raftario/setup-rust-action@f74294776374514bbcc27b4623c1b220ef9394bf | |
uses: raftario/setup-rust-action@v1.0.0 | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
- if: ${{ matrix.os == 'ubuntu-latest'}} | |
name: Install Ubuntu Dependencies | |
run: | | |
npm i turbo-linux-64 @tauri-apps/cli-linux-x64-gnu && | |
sudo apt update && | |
sudo apt install libwebkit2gtk-4.0-dev \ | |
build-essential \ | |
curl \ | |
wget \ | |
libssl-dev \ | |
libgtk-3-dev \ | |
libayatana-appindicator3-dev \ | |
librsvg2-dev | |
- if: ${{ matrix.os == 'macos-latest'}} | |
name: Install MacOS Dependencies | |
run: | | |
npm i turbo-darwin-arm64 @tauri-apps/cli-darwin-arm64 && | |
rustup target add aarch64-apple-darwin | |
- run: npm i | |
- if: ${{ matrix.os == 'macos-latest'}} | |
name: Build App MacOS | |
run: npx turbo run build --filter=desktop -- --target universal-apple-darwin | |
- if: ${{ matrix.os != 'macos-latest'}} | |
name: Build App | |
run: npx turbo run build --filter=desktop | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3.1.1 | |
with: | |
# Artifact name | |
name: ${{ matrix.os }} | |
# A file, directory or wildcard pattern that describes what to upload | |
if-no-files-found: ignore | |
path: | | |
platforms/desktop/src-tauri/target/release/bundle/appimage/*.AppImage | |
platforms/desktop/src-tauri/target/release/bundle/deb/*.deb | |
platforms/desktop/src-tauri/target/release/bundle/msi/*.msi | |
platforms/desktop/src-tauri/target/release/*.exe | |
platforms/desktop/src-tauri/target/release/bundle/macos/*.app | |
platforms/desktop/src-tauri/target/release/bundle/dmg/*.dmg | |
platforms/desktop/src-tauri/target/release/bundle/osx/*.app | |
platforms/desktop/src-tauri/target/universal-apple-darwin/release/bundle/macos/*.app | |
platforms/desktop/src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg |