Skip to content

Commit

Permalink
Tauri app build action (#1257)
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-leevsey authored Aug 20, 2024
2 parents 8dc94d0 + 2b8eff3 commit ffe4957
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/build_tauri_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: 'publish_tauri_app'

on:
push:
branches:
- feat/tauri-app
tags:
- '*'
workflow_dispatch:

jobs:
Expand All @@ -18,49 +18,52 @@ jobs:
args: '--target aarch64-apple-darwin'
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-20.04'
- platform: 'ubuntu-22.04'
args: ''
- platform: 'windows-latest'
args: ''

runs-on: ${{ matrix.settings.platform }}
steps:
- uses: actions/checkout@v4

- name: install dependencies (ubuntu only)
if: matrix.settings.platform == 'ubuntu-20.04'
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.0-dev libappindicator3-dev librsvg2-dev patchelf
sudo apt-get update
sudo apt-get install -y build-essential libssl-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
echo "PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig" >> $GITHUB_ENV
echo "LIBRARY_PATH=\$LIBRARY_PATH:/usr/local/opt/openssl/lib" >> $GITHUB_ENV
echo "C_INCLUDE_PATH=\$C_INCLUDE_PATH:/usr/local/opt/openssl/include" >> $GITHUB_ENV
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
node-version: 18
cache: 'yarn'

- name: install Rust stable
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: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'

# - name: install frontend dependencies
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
# run: yarn install # change this to npm or pnpm depending on which one you use.

- name: install deps
run: yarn add -D @tauri-apps/cli && yarn install

- name: install frontend dependencies
run: yarn tauri build ${{ matrix.settings.args }}
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_DEPLOY_ACCESS_TOKEN }}
with:
tauriScript: true
tagName: cyb-tauri-${{ github.sha }}
releaseName: 'App ${{ github.sha }}'
releaseBody: 'See the assets to download this version and install.'
releaseName: 'Cyb standalone app ${{ github.sha }}'
releaseBody: 'See the assets to install this version.'
releaseDraft: true
prerelease: false
args: ${{ matrix.settings.args }}

0 comments on commit ffe4957

Please sign in to comment.