change to use nsis installer #42
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
| #.github/workflows/main.yml | |
| name: build-tauri | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build-tauri: | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [windows-latest] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - 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: rust setup | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: rust cache | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: './src-tauri -> target' | |
| - name: sync node version | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Update version in tauri.conf.json | |
| run: | | |
| $tag = "${{ github.ref_name }}" | |
| $version = $tag.Substring(1) | |
| $manifestPath = "src-tauri/tauri.conf.json" | |
| $manifest = Get-Content $manifestPath -Raw | ConvertFrom-Json | |
| $manifest.version = $version | |
| $manifest | ConvertTo-Json -Depth 100 | Set-Content $manifestPath | |
| shell: pwsh | |
| - name: Install 7-Zip | |
| run: choco install 7zip | |
| if: matrix.platform == 'windows-latest' | |
| - name: build-tauri | |
| run: pnpm tauri build | |
| - name: Update Release Assets | |
| uses: softprops/action-gh-release@v2.0.5 | |
| with: | |
| files: | | |
| src-tauri\target\release\bundle\nsis\*.exe | |
| if: matrix.platform == 'windows-latest' |