Skip to content

Bumps to 0.9.3

Bumps to 0.9.3 #22

Workflow file for this run

name: Build/release
on:
push:
tags:
- 'v*'
jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest' # for Arm based macs (M1 and above).
args: '--target aarch64-apple-darwin'
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04.
args: ''
- platform: 'windows-latest'
args: ''
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install frontend dependencies
run: pnpm install
- 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.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Extract the database
run: cd public && 7z x database.7z && rm database.7z
- name: Decode and Import Certificate
if: matrix.platform == 'macos-latest'
env:
CERTIFICATE_P12: ${{ secrets.CERTIFICATE_P12 }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
run: |
echo $CERTIFICATE_P12 | base64 --decode > certificate.p12
security create-keychain -p "" build.keychain
security import certificate.p12 -k build.keychain -P $CERTIFICATE_PASSWORD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain
- name: Build Tauri app
run: pnpm run tauri build
- name: Code sign the app
if: matrix.platform == 'macos-latest'
run: |
codesign --deep --force --verbose --sign "Developer ID Application: Your Name (Team ID)" src-tauri/target/release/bundle/macos/YourApp.app
- name: Create zip for notarization
if: matrix.platform == 'macos-latest'
run: |
ditto -c -k --sequesterRsrc --keepParent src-tauri/target/release/bundle/macos/YourApp.app YourApp.zip
- name: Notarize app
if: matrix.platform == 'macos-latest'
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
run: |
xcrun altool --notarize-app --primary-bundle-id "com.yourcompany.yourapp" --username "$APPLE_ID" --password "$APPLE_PASSWORD" --file YourApp.zip
- name: Staple notarization
if: matrix.platform == 'macos-latest'
run: |
xcrun stapler staple src-tauri/target/release/bundle/macos/YourApp.app
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__
releaseName: 'App v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: false
prerelease: false
args: ${{ matrix.args }}