-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: gh action to build the app artifacts
- Loading branch information
1 parent
b70195f
commit f75abf0
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
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
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* |