Fix rust targets being incorrect and fix certificates being loaded on… #11
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: 'publish' | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
publish-tauri: | |
name: Build release artifacts | |
environment: Stable | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: 'macos-latest' # for universal binary. | |
args: '--target universal-apple-darwin' | |
targets: 'aarch64-apple-darwin,x86_64-apple-darwin' | |
- platform: 'windows-latest' # x86. | |
args: '--target i686-pc-windows-msvc --bundles msi' | |
targets: 'i686-pc-windows-msvc' | |
- platform: 'windows-latest' # x64. | |
args: '--target x86_64-pc-windows-msvc --bundles msi' | |
targets: 'x86_64-pc-windows-msvc' | |
- platform: 'ubuntu-22.04' | |
args: '' | |
targets: '' | |
- platform: ' ubuntu-24.04-arm' | |
args: '' | |
targets: '' | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install dependencies (ubuntu only) | |
if: matrix.platform == 'ubuntu-22.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: 'yarn' | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.targets }} | |
- name: Rust cache | |
uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: './src-tauri -> target' | |
- name: install frontend dependencies | |
run: yarn install --frozen-lockfile | |
- name: Import Apple Developer Certificate | |
if: matrix.platform == 'macos-latest' | |
env: | |
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | |
run: | | |
echo $APPLE_CERTIFICATE | base64 --decode > certificate.p12 | |
security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain | |
security default-keychain -s build.keychain | |
security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain | |
security set-keychain-settings -t 3600 -u build.keychain | |
security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign | |
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain | |
security find-identity -v -p codesigning build.keychain | |
- uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tagName: ${{ github.ref }} | |
releaseName: Snip ${{ github.ref }} | |
releaseBody: See the assets to download ${{ github.ref }} of Snip Editor. | |
releaseDraft: true | |
prerelease: false | |
args: ${{ matrix.args }} |