Skip to content

add tauri script

add tauri script #53

Workflow file for this run

name: 'publish'
on:
push:
tags:
- 'app-v*'
jobs:
publish-tauri:
environment: release
strategy:
fail-fast: true
matrix:
platform: [macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: install Rust nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
# - 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: install app dependencies and build it
run: npm install --include=dev --legacy-peer-deps && npm run build
- uses: tauri-apps/tauri-action@v0
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 }}
with:
tagName: app-v__VERSION__
releaseName: 'App v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false