feat: function completion #7
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 Build | |
| on: | |
| push: | |
| tags: | |
| - "v*" # 当推送以 'v' 开头的标签时触发 | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| # macOS ARM64 (Apple Silicon) | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| platform: macos-arm64 | |
| # macOS x64 (Intel) | |
| - os: macos-latest | |
| target: x86_64-apple-darwin | |
| platform: macos-x64 | |
| # Windows x64 | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| platform: windows-x64 | |
| # Windows ARM64 | |
| - os: windows-latest | |
| target: aarch64-pc-windows-msvc | |
| platform: windows-arm64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "yarn" | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install Rust dependencies (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| rustup target add ${{ matrix.target }} | |
| cargo install tauri-cli --version "^2.0" | |
| - name: Install Rust dependencies (macOS) | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| rustup target add ${{ matrix.target }} | |
| cargo install tauri-cli --version "^2.0" | |
| - name: Install frontend dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Build frontend | |
| run: yarn build | |
| - name: Build Tauri app | |
| run: cargo tauri build --target ${{ matrix.target }} | |
| - name: Upload macOS artifacts | |
| if: matrix.os == 'macos-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: easydb-${{ matrix.platform }} | |
| path: src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg | |
| retention-days: 30 | |
| - name: Upload Windows artifacts | |
| if: matrix.os == 'windows-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: easydb-${{ matrix.platform }} | |
| path: | | |
| src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*.exe | |
| retention-days: 30 | |
| create-release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./artifacts | |
| - name: List downloaded artifacts | |
| run: | | |
| find ./artifacts -type f -name "*.dmg" -o -name "*.msi" -o -name "*.exe" -o -name "*.app" | head -20 | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Release ${{ github.ref_name }} | |
| draft: false | |
| prerelease: false | |
| files: | | |
| ./artifacts/easydb-macos-arm64/*.dmg | |
| ./artifacts/easydb-macos-x64/*.dmg | |
| ./artifacts/easydb-windows-x64/*.exe | |
| ./artifacts/easydb-windows-arm64/*.exe | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |