Tauri #38
Workflow file for this run
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 | |
on: | |
release: | |
types: [published] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [macos-latest, ubuntu-latest, windows-latest, self-hosted] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Install dependencies (ubuntu only) | |
if: matrix.platform == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev | |
- uses: Jimver/[email protected] | |
if: matrix.platform == 'ubuntu-latest' | |
id: cuda-toolkit-linux | |
with: | |
cuda: "12.1.0" | |
linux-local-args: '["--toolkit"]' | |
- uses: Jimver/[email protected] | |
if: matrix.platform == 'windows-latest' | |
id: cuda-toolkit-windows | |
with: | |
cuda: "12.1.0" | |
- name: Rust setup | |
if: matrix.platform != 'self-hosted' | |
uses: dtolnay/rust-toolchain@stable | |
- name: Rust cache | |
if: matrix.platform != 'self-hosted' | |
uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: "./apps/desktop/src-tauri -> target" | |
- name: install node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Setup pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: "latest" | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: import windows certificate | |
if: matrix.platform == 'windows-latest' | |
env: | |
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }} | |
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} | |
run: | | |
New-Item -ItemType directory -Path certificate | |
Set-Content -Path certificate/tempCert.txt -Value $env:WINDOWS_CERTIFICATE | |
certutil -decode certificate/tempCert.txt certificate/certificate.pfx | |
Remove-Item -path certificate -include tempCert.txt | |
Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText) | |
- name: pnpm stuffs | |
run: | | |
pnpm i | |
pnpm build:sdk | |
- name: to tauri path | |
run: | | |
cd apps | |
cd desktop | |
- name: Build the app | |
id: tauri_action | |
uses: tauri-apps/tauri-action@dev | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | |
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }} | |
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_PROVIDER_SHORT_NAME: ${{ secrets.APPLE_PROVIDER_SHORT_NAME }} | |
with: | |
prerelease: false | |
releaseDraft: false | |
releaseName: "v__VERSION__" | |
releaseBody: ${{ github.event.release.body }} | |
releaseId: ${{ github.event.release.id }} | |
tagName: ${{ github.event.release.tag_name }} |