CI/CD: Update tauri-cli in package.json #26
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: Tauri Build + Release | |
on: | |
push: | |
branches: [ develop, staging, release ] | |
# This workflow will build your tauri app without uploading it anywhere. | |
jobs: | |
# test: | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# platform: [macos-latest, ubuntu-latest, windows-latest] | |
# runs-on: ${{ matrix.platform}} | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Install the Rust toolchain | |
# uses: dtolnay/rust-toolchain@stable | |
# - name: Initialize Rust cache | |
# uses: swatinem/rust-cache@v2 | |
# with: | |
# workspaces: './backend -> target' | |
# - name: Setup Node.js | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version: 20 | |
# cache: 'npm' | |
# - name: Install dependencies (ubuntu only) | |
# if: matrix.platform == 'ubuntu-latest' | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install -y libsoup-3.0-dev libwebkit2gtk-4.1-dev javascriptcoregtk-4.1 build-essential curl wget file libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev | |
# - name: Run unit tests | |
# run: | | |
# cd backend | |
# cargo test | |
build-and-release: | |
# needs: test | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [macos_x86-latest, macos_arm-latest, ubuntu-latest, windows-latest] | |
runs-on: ${{ (matrix.platform == 'macos_x86-latest' || matrix.platform =='macos_arm-latest' ) && 'macos-latest' || matrix.platform}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install the Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- if: matrix.platform == 'macos_arm-latest' | |
name: Install ARM Rust target | |
run: rustup target add aarch64-apple-darwin | |
- name: Initialize Rust cache | |
uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: './backend -> target' | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Install frontend dependencies | |
run: | | |
cd frontend | |
npm install | |
- name: Install dependencies (ubuntu only) | |
if: matrix.platform == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libsoup-3.0-dev libwebkit2gtk-4.1-dev patchelf javascriptcoregtk-4.1 build-essential curl wget file libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev | |
# If tagName and releaseId are omitted tauri-action will only build the app and won't try to upload any asstes. | |
- uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
with: | |
args: ${{ matrix.platform == 'macos_arm-latest' && ' --target aarch64-apple-darwin' || '' }} | |
projectPath: backend | |
distPath: frontend/dist | |
tagName: "v__VERSION__-${{ github.ref_name == 'staging' && 'beta' || github.ref_name == 'release' && 'latest' || 'dev' }}" | |
releaseName: "Avail Wallet v__VERSION__-${{ github.ref_name == 'staging' && 'beta' || github.ref_name == 'release' && 'latest' || 'dev' }}" | |
releaseBody: 'See the assets to download this version and install.' | |
releaseDraft: true | |
prerelease: false |