houhou/.github/workflows/tauri.yml

56 lines
1.5 KiB
YAML
Raw Normal View History

2023-06-12 04:11:59 +00:00
name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
2023-06-12 14:43:59 +00:00
release:
2023-06-12 04:11:59 +00:00
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]
2023-06-12 04:34:22 +00:00
runs-on: ${{ matrix.platform }}
2023-06-12 14:43:59 +00:00
2023-06-12 04:11:59 +00:00
steps:
2023-06-12 14:43:59 +00:00
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies (ubuntu only)
2023-06-12 04:11:59 +00:00
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
2023-06-12 14:43:59 +00:00
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: swatinem/rust-cache@v2
2023-06-12 04:11:59 +00:00
with:
2023-06-12 14:43:59 +00:00
workspaces: "./src-tauri -> target"
2023-06-12 04:11:59 +00:00
2023-06-12 14:43:59 +00:00
- name: Sync node version and setup cache
uses: actions/setup-node@v3
with:
node-version: "lts/*"
cache: "npm"
- name: Install frontend dependencies
run: npm install
- name: Build the app
uses: tauri-apps/tauri-action@v0
2023-06-12 04:11:59 +00:00
env:
2023-06-12 14:43:59 +00:00
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2023-06-12 04:11:59 +00:00
with:
2023-06-12 14:43:59 +00:00
tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags.
releaseName: "Houhou v__VERSION__" # tauri-action replaces \_\_VERSION\_\_ with the app version.
releaseBody: "See the assets to download and install this version."
releaseDraft: false
prerelease: false