0.1.6 #28
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*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
publish-tauri: | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- build: linux | |
os: ubuntu-latest | |
arch: x86_64 | |
target: x86_64-unknown-linux-gnu | |
- build: macos | |
os: macos-latest | |
arch: x86_64 | |
target: x86_64-apple-darwin | |
- buid: macos | |
os: macos-latest | |
arch: aarch64 | |
target: aarch64-apple-darwin | |
- build: windows | |
os: windows-latest | |
arch: x86_64 | |
target: x86_64-pc-windows-msvc | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 7 | |
run_install: false | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target }} | |
- name: install dependencies (ubuntu only) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: Install rust target | |
run: rustup target add ${{ matrix.target }} | |
- name: install frontend dependencies | |
run: pnpm install --frozen-lockfile | |
- uses: tauri-apps/tauri-action@dev | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_KEY_PASSWORD: '' | |
with: | |
projectPath: src-tauri | |
configPath: src-tauri/tauri.conf.json | |
tauriScript: pnpm | |
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version | |
releaseName: v__VERSION__ | |
releaseBody: See the assets to download this version and install. | |
prerelease: false | |
args: --target ${{ matrix.target }} | |
updater: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
needs: publish-tauri | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 7 | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
- name: Updater JSON | |
run: pnpm updater --token=${{ secrets.GITHUB_TOKEN }} | |
- name: Deploy install.json | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./updater | |
# force_orphan: true | |
- name: Query version number | |
run: echo "version=${GITHUB_REF:11}" >> $GITHUB_ENV |