Release #12
Workflow file for this run
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| publish-tauri: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: 'macos-latest' | |
| args: '--target universal-apple-darwin' | |
| - platform: 'windows-latest' | |
| args: '' | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
| - name: Install dependencies (Ubuntu only) | |
| if: matrix.platform == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| - name: Build and Release | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| with: | |
| tagName: v__VERSION__ | |
| releaseName: 'SnippetsHub v__VERSION__' | |
| releaseBody: | | |
| ## SnippetsHub v__VERSION__ | |
| ### 📦 下载安装 | |
| - **macOS**: 下载 `.dmg` 文件 | |
| - **Windows**: 下载 `.msi` 或 `.exe` 文件 | |
| ### ✨ 主要功能 | |
| - 💻 代码片段管理 | |
| - 📝 Markdown 编辑器 | |
| - ✅ TODO 任务管理 | |
| - ⭐ 收藏管理 | |
| - 🎨 主题切换 | |
| - ⌨️ 快捷键支持 | |
| ### 📝 更新日志 | |
| 详见 [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) | |
| releaseDraft: false | |
| prerelease: false | |
| args: ${{ matrix.args }} |