Skip to content

Merge pull request #71 from mrodz/master #20

Merge pull request #71 from mrodz/master

Merge pull request #71 from mrodz/master #20

Workflow file for this run

name: 'publish'
on:
push:
branches:
- release
# This workflow will trigger on each `release` published, both pre-release and stable release.
env:
TAURI_PRIVATE_KEY: ${{secrets.TAURI_PRIVATE_KEY}}
TAURI_KEY_PASSWORD: ${{secrets.TAURI_KEY_PASSWORD}}
jobs:
publish-tauri:
environment: production
permissions:
contents: write
strategy:
fail-fast: false
matrix:
settings:
- 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'
args: ''
- platform: 'windows-latest'
args: ''
runs-on: ${{ matrix.settings.platform }}
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
- 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.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: set up rust cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: "v0-rust"
- name: install dependencies (ubuntu only)
if: matrix.settings.platform == 'ubuntu-22.04' # This must match the platform value defined above.
# sudo apt-get install -y javascriptcoregtk-4.1 libsoup-3.0 libsoup2.4-dev webkit2gtk-4.1 build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf librsvg2-dev protobuf-compiler
run: |
sudo apt-get update
sudo apt-get install -y build-essential curl wget file libssl-dev libsoup2.4-dev javascriptcoregtk-4.1 libsoup-3.0 webkit2gtk-4.1 libwebkit2gtk-4.1-dev libwebkit2gtk-4.0-dev librsvg2-dev libayatana-appindicator3-dev librsvg2-dev patchelf
- name: install protoc (OSX)
if: matrix.settings.platform == 'macos-latest'
run: |
brew install protobuf
- name: install protoc (PC)
if: matrix.settings.platform == 'windows-latest'
run: |
choco install protoc
- name: install frontend dependencies
run: npm install # change this to npm, pnpm or bun depending on which one you use.
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: 'App v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
args: ${{ matrix.settings.args }}