feat: optimize image review ui #120
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: | |
branches: | |
- release | |
# This is the example from the readme. | |
# On each push to the `release` branch it will create or update a GitHub release, build your app, and upload the artifacts to the release. | |
jobs: | |
publish-tauri: | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: macos-latest | |
target: aarch64-apple-darwin | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
- os: ubuntu-20.04 | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
- os: windows-latest | |
target: i686-pc-windows-msvc | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'yarn' | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: Rust cache | |
uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: "./src-tauri -> target" | |
key: ${{ matrix.os }}-${{ matrix.target }} | |
- if: matrix.target | |
run: rustup target add ${{ matrix.target }} | |
- name: install dependencies (ubuntu only) | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: install frontend dependencies | |
run: yarn install # change this to npm or pnpm depending on which one you use | |
- uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | |
with: | |
includeUpdaterJson: true | |
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: false | |
prerelease: false | |
args: ${{ matrix.target && format('--target {0}', matrix.target) }} | |
- name: Portable Bundle | |
if: matrix.os == 'windows-latest' | |
uses: ./.github/workflows/windows-portable | |
with: | |
target: ${{ matrix.target }} | |
version-template: 'app-v__VERSION__' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | |
- name: update release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: latest.json | |
tag_name: latest |