Skip to content

Build and Release

Build and Release #18

Workflow file for this run

name: Build and Release
on:
workflow_dispatch:
inputs:
release_message:
description: "Message to show in the update dialog"
type: string
required: true
default: |
发现新版本,如果更新失败,请到官网下载最新版本:https://feiyu-player.xbox.work
env:
RELEASE_MESSAGE: ${{ inputs.release_message }}
jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [ubuntu-22.04]
# platform: [macos-latest, ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v2.4.0
with:
version: 8
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Setup rust
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./packages/feiyu-desktop/src-tauri -> target"
- name: Install feiyu web dependencies
run: cd packages/feiyu && pnpm i
- name: Install feiyu desktop dependencies
run: cd packages/feiyu-desktop && pnpm i
- name: Build feiyu web
run: cd packages/feiyu && pnpm build:desktop
- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Build feiyu desktop
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PKG_CONFIG_PATH
PKG_CONFIG_SYSROOT_DIR: '/'
PKG_CONFIG_PATH: '/usr/lib/pkgconfig:/usr/local/lib/pkgconfig'
# Updater
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with:
tagName: "v__VERSION__"
releaseName: "v__VERSION__"
releaseBody: ${{ env.RELEASE_MESSAGE }}
releaseDraft: true
prerelease: false
projectPath: "./packages/feiyu-desktop"