chore: bump version to v0.4.15 #59
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: | |
| inputs: | |
| version: | |
| description: 'Release version (e.g., v1.0.0)' | |
| required: true | |
| default: 'v1.0.0' | |
| jobs: | |
| release: | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: 'windows-latest' | |
| args: '' | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Rust setup | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: '' | |
| - name: Rust cache | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: './src-tauri -> target' | |
| - name: Sync node version and setup cache | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'yarn' | |
| cache-dependency-path: 'yarn.lock' | |
| - name: Install frontend dependencies | |
| run: yarn install --frozen-lockfile --prefer-offline | |
| - name: Verify data files exist | |
| run: | | |
| node -e " | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| console.log('=== Checking data files ==='); | |
| const dataDir = 'src-tauri/data'; | |
| const requiredFiles = ['init.sql']; | |
| try { | |
| const files = fs.readdirSync(dataDir); | |
| console.log('Files in data directory:', files); | |
| for (const file of requiredFiles) { | |
| const filePath = path.join(dataDir, file); | |
| if (!fs.existsSync(filePath)) { | |
| console.error('Error: ' + file + ' not found'); | |
| process.exit(1); | |
| } | |
| console.log('✓ Found:', file); | |
| } | |
| console.log('=== All required data files found ==='); | |
| } catch (error) { | |
| console.error('Error checking data files:', error.message); | |
| process.exit(1); | |
| } | |
| " | |
| - name: Cache vcpkg and OpenSSL (Windows) | |
| if: runner.os == 'Windows' | |
| id: cache-vcpkg | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| vcpkg | |
| ~/.vcpkg | |
| key: vcpkg-openssl-${{ runner.os }}-x64-windows-static-md-v1 | |
| restore-keys: | | |
| vcpkg-openssl-${{ runner.os }}- | |
| - name: Setup vcpkg (Windows) | |
| if: runner.os == 'Windows' && steps.cache-vcpkg.outputs.cache-hit != 'true' | |
| run: | | |
| git clone --depth 1 https://github.com/microsoft/vcpkg.git | |
| cd vcpkg | |
| .\bootstrap-vcpkg.bat | |
| shell: pwsh | |
| - name: Install OpenSSL (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| $triplet = 'x64-windows-static-md' | |
| $opensslLib = Join-Path $env:GITHUB_WORKSPACE "vcpkg\installed\$triplet\lib\libssl.lib" | |
| if (Test-Path $opensslLib) { | |
| Write-Host "OpenSSL already present at $opensslLib" | |
| exit 0 | |
| } | |
| cd vcpkg | |
| .\vcpkg install "openssl:$triplet" --triplet $triplet | |
| shell: pwsh | |
| - name: Set VCPKG_ROOT (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| $triplet = 'x64-windows-static-md' | |
| echo "VCPKG_ROOT=${{ github.workspace }}/vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| echo "OPENSSL_LIB_DIR=${{ github.workspace }}/vcpkg/installed/$triplet/lib" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| echo "OPENSSL_INCLUDE_DIR=${{ github.workspace }}/vcpkg/installed/$triplet/include" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| shell: pwsh | |
| - name: Prepare updater signing key | |
| run: node scripts/ci/prepare-tauri-signing-key.cjs | |
| env: | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| - name: Build the app | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ env.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| WALLETSTOOL_UPDATER_PUBKEY: ${{ secrets.TAURI_UPDATER_PUBKEY }} | |
| # 临时禁用代码签名以解决macOS兼容性问题 | |
| CI: true | |
| with: | |
| tagName: ${{ github.ref_name || github.event.inputs.version }} | |
| releaseName: 'Wallets Tool ${{ github.ref_name || github.event.inputs.version }}' | |
| releaseBody: | | |
| ## 🎉 新版本发布 v0.4.15 | |
| ### 📦 安装包下载 | |
| - **Windows**: 下载 `.exe` 文件 | |
| ### 🔄 更新说明 | |
| ### ✨ New Features | 新功能 | |
| - **updater:** 实现应用内自动更新功能并优化界面 | |
| releaseDraft: false | |
| prerelease: false | |
| args: ${{ matrix.args }} | |
| cleanup: | |
| if: always() | |
| needs: [release] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Clean up artifacts | |
| run: | | |
| echo "Cleaning up build artifacts..." | |
| # 清理临时文件等操作 |