GitHub Releases
This is a great alternative for anyone that doesn’t want to develop their own custom server implementation. It’s free to use and does everything you need.
Simply set up tauri-action and it will handle building and pushing releases for you.
Make sure you set up your endpoints so that your users can access them. There are advanced techniques available for not making endpoints completely public, but if you gotta ask how to do it you’re not ready for it.
{ "tauri": { "updater": { "active": true, "endpoints": [ "https://github.com/USERNAME/PUBLIC_REPOSITORY/releases/latest/download/latest.json" ], "dialog": true, "pubkey": "YOUR_UPDATER_SIGNATURE_PUBKEY_HERE" } }}
If you don’t see your release on GitHub make sure to visit the releases page manually to verify if the issue is simply that you’re still dealing with a draft release.
# Triggers on tagged commits to the main branch starting with "v"# `git tag -a v0.1.0 -m "Version 0.1.0"name: Release
on: push: tags: - v*
jobs: publish-tauri: permissions: contents: write strategy: fail-fast: false matrix: platform: [macos-latest, ubuntu-20.04, windows-latest]
runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v4 with: lfs: true fetch-depth: 0
- name: Install Rust uses: dtolnay/rust-toolchain@stable
- name: Setup node uses: actions/setup-node@v4 with: node-version: 20
- name: Setup and run pnpm install uses: pnpm/action-setup@v2 with: version: 8 run_install: | - recursive: true args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Install dependencies (ubuntu only) if: matrix.platform == 'ubuntu-20.04' run: | sudo apt-get update sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Build and upload a GitHub release uses: tauri-apps/tauri-action@v0 env: TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tagName: v__VERSION__ releaseName: "App v__VERSION__" releaseBody: | See the assets to download and install this version.
If you get a virus warning read this article: https://tauri.by.simon.hyll.nu/concepts/security/false_positives/.
Mac: Extract the .app from the .dmg and run `xattr -d com.apple.quarantine your-app.app`. Windows: Run `attrib -r your-app.msi:Zone.Identifier`. releaseDraft: false prerelease: false includeUpdaterJson: true
While it’s possible to have a super weird direct GitHub API variant for it the by far easiest solution for private repositories is to just make a separate public repository.
In your GitHub workflow simply ensure the GITHUB_TOKEN
has access to the public repository, e.g. by using a personal access token, and set the target repository for tauri-action
manually in its owner
and repo
options.
- uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.PAT_FOR_PUBLIC_REPO }} with: owner: ORGANIZATION repo: PUBLIC_REPOSITORY
It’s still unknown why this happens, but there seems to be something weird going on in GitHubs end. I managed to get past this by running the workflow once using a personal access token with every single permission granted you can imagine. After that something gets unblocked that allows you to revert to a more sane workflow. Again, no idea why it happens, but at least it’s a temporary issue, run with an admin PAT once and you should be unblocked.
Simply create a PAT for your user, give it all permissions, then instead of secrets.GITHUB_TOKEN
you set it to your PAT, e.g. GH_PAT
. Remember to add the secret to your repository before running the workflow.