Fixed Npm Deps #73
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 | |
env: | |
CARGO_TERM_COLOR: always | |
on: [push] | |
jobs: | |
build-tauri: | |
name: Build Tauri Application | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
settings: | |
- platform: 'ubuntu-22.04' | |
args: '' | |
# TODO: maybe target specifically ARM based macs and Intel based macs to reduce built bundle size | |
# - platform: 'macos-latest' # for Arm based macs (M1 and above). | |
# args: '--target aarch64-apple-darwin' | |
# - platform: 'macos-latest' # for Intel based macs. | |
# args: '--target x86_64-apple-darwin' | |
- platform: 'macos-latest' | |
args: '--target universal-apple-darwin' | |
- platform: 'windows-latest' | |
args: '' | |
runs-on: ${{ matrix.settings.platform }} | |
env: | |
CI: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Dependencies (Ubuntu only) | |
if: matrix.settings.platform == 'ubuntu-22.04' # This must match the platform value defined above. | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: 'npm' | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. | |
targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
- name: Set up Rust Cache | |
uses: swatinem/rust-cache@v2 | |
- name: Install Node Dependencies | |
run: npm install | |
- uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
releaseBody: 'See the assets to download this version and install.' | |
releaseDraft: true | |
prerelease: false | |
args: ${{ matrix.settings.args }} | |
# Linux | |
- name: Upload Linux deb | |
uses: actions/upload-artifact@v4 | |
if: matrix.settings.platform == 'ubuntu-22.04' | |
with: | |
name: ark-drop-desktop_linux_deb | |
path: ./src-tauri/target/release/bundle/deb/*.deb | |
- name: Upload Linux rpm | |
uses: actions/upload-artifact@v4 | |
if: matrix.settings.platform == 'ubuntu-22.04' | |
with: | |
name: ark-drop-desktop_linux_rpm | |
path: ./src-tauri/target/release/bundle/rpm/*.rpm | |
- name: Upload Linux AppImage | |
uses: actions/upload-artifact@v4 | |
if: matrix.settings.platform == 'ubuntu-22.04' | |
with: | |
name: ark-drop-desktop_linux_appimage | |
path: ./src-tauri/target/release/bundle/appimage/*.AppImage | |
# MacOS | |
- name: Upload MacOS app | |
uses: actions/upload-artifact@v4 | |
if: matrix.settings.platform == 'macos-latest' | |
with: | |
name: ark-drop-desktop_macos_app | |
path: ./src-tauri/target/universal-apple-darwin/release/bundle/macos/*.app | |
- name: Upload MacOS dmg | |
uses: actions/upload-artifact@v4 | |
if: matrix.settings.platform == 'macos-latest' | |
with: | |
name: ark-drop-desktop_macos_dmg | |
path: ./src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg | |
# Windows | |
- name: Upload Windows msi | |
uses: actions/upload-artifact@v4 | |
if: matrix.settings.platform == 'windows-latest' | |
with: | |
name: ark-drop-desktop_windows_msi | |
path: ./src-tauri/target/release/bundle/msi/*.msi | |
- name: Upload Windows exe | |
uses: actions/upload-artifact@v4 | |
if: matrix.settings.platform == 'windows-latest' | |
with: | |
name: ark-drop-desktop_windows_exe | |
path: ./src-tauri/target/release/bundle/nsis/*.exe |