I'm actually stupid #65
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 | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Setup pNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 21 | |
cache: 'pnpm' | |
cache-dependency-path: pnpm-lock.yaml | |
- name: Install dependencies for Tauri (ubuntu only) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf | |
- name: Load cached node_modules | |
uses: actions/cache@v3 | |
with: | |
path: | | |
node_modules | |
~/.pnpm-store | |
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: ${{ runner.os }}-pnpm- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build the app | |
run: pnpm tauri build --debug | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ runner.os }} ${{ runner.arch }} artifacts | |
# No .app because it's pretty big and .dmg is nicer | |
path: | | |
src-tauri/target/debug/bundle/*/*.dmg | |
src-tauri/target/debug/bundle/*/*.app | |
src-tauri/target/debug/bundle/*/*.AppImage | |
src-tauri/target/debug/bundle/*/*.deb | |
src-tauri/target/debug/bundle/*/*.msi |