Skip to content

Commit

Permalink
feat: gh action to build the app artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
MatiasVerdier committed Feb 27, 2022
1 parent b70195f commit f75abf0
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build Twincy App.

on:
push:
branches: [ tauri-migration ]
pull_request:
branches: [ tauri-migration ]

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- name: Setup Rust cache
uses: actions/cache@v2
with:
key: ${{ matrix.os }}-${{ hashFiles('packages/admin/src-tauri/Cargo.lock') }}
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git
./packages/admin/src-tauri/target
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: npm
cache-dependency-path: |
package-lock.json
- name: 🦀 Install Rust
uses: actions-rs/toolchain@v1
with: { toolchain: stable }

- name: Install webkit2gtk (ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get upgrade -y --no-install-recommends webkit2gtk-4.0
- name: Install Node.js dependencies
run: npm install

- name: Download Rust dependencies
run: cargo fetch --manifest-path=packages/admin/src-tauri/Cargo.toml

- name: Build application
run: npm run build:tauri

- name: Upload release artifacts
uses: actions/upload-artifact@v2
with:
name: release-${{ matrix.os }}
path: |
packages/admin/src-tauri/target/release/bundle
packages/admin/src-tauri/target/release/twincy-admin*

0 comments on commit f75abf0

Please sign in to comment.