chore: bump version to 0.6.1 #37
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*' | |
| jobs: | |
| release: | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| - name: Install bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Cache bun dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }} | |
| restore-keys: bun-${{ runner.os }}- | |
| - name: Install frontend dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Download whisper.cpp sidecar | |
| run: pwsh scripts/download-whisper-cpp.ps1 | |
| - 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: ${{ github.ref_name }} | |
| releaseName: 'Whisperi ${{ github.ref_name }}' | |
| releaseBody: 'See [CHANGELOG](https://github.com/xarthurx/whisperi/blob/main/docs/CHANGELOG.md) for details.' | |
| releaseDraft: false | |
| prerelease: false | |
| updaterJsonPreferNsis: true | |
| update-winget: | |
| needs: release | |
| runs-on: windows-latest | |
| permissions: | |
| contents: read | |
| env: | |
| PACKAGE_IDENTIFIER: xarthurx.Whisperi | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.WINGET_CREATE_GITHUB_TOKEN }} | |
| RELEASE_TAG: ${{ github.ref_name }} | |
| steps: | |
| - name: Validate Winget token | |
| shell: pwsh | |
| run: | | |
| if ([string]::IsNullOrWhiteSpace($env:WINGET_CREATE_GITHUB_TOKEN)) { | |
| Write-Warning "WINGET_CREATE_GITHUB_TOKEN not configured — skipping Winget submission." | |
| exit 0 | |
| } | |
| - name: Install .NET 6 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '6.0.x' | |
| - name: Download wingetcreate | |
| shell: pwsh | |
| run: Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe | |
| - name: Submit Winget manifest update | |
| shell: pwsh | |
| run: | | |
| $headers = @{ | |
| Authorization = "Bearer $env:GITHUB_TOKEN" | |
| Accept = "application/vnd.github+json" | |
| "X-GitHub-Api-Version" = "2022-11-28" | |
| } | |
| $releaseApiUrl = "https://api.github.com/repos/${{ github.repository }}/releases/tags/$env:RELEASE_TAG" | |
| Write-Output "Fetching release from: $releaseApiUrl" | |
| $release = Invoke-RestMethod -Headers $headers -Uri $releaseApiUrl | |
| $tag = $release.tag_name | |
| $version = $tag -replace '^v', '' | |
| $assets = @($release.assets) | |
| $installerAssets = @($assets | Where-Object { $_.name -like '*_x64-setup.exe' }) | |
| if ($installerAssets.Count -ne 1) { | |
| throw "Expected exactly one x64 setup asset on release $tag, found $($installerAssets.Count)." | |
| } | |
| .\wingetcreate.exe update ` | |
| $env:PACKAGE_IDENTIFIER ` | |
| -u $installerAssets[0].browser_download_url ` | |
| -v $version ` | |
| -t $env:WINGET_CREATE_GITHUB_TOKEN ` | |
| --submit |