Skip to content

Publish a new version #178

Publish a new version

Publish a new version #178

Workflow file for this run

name: Publish
run-name: Publish a new version
on: workflow_dispatch
permissions:
contents: write
packages: write
jobs:
build:
outputs:
appVersion: ${{ steps.tauri.outputs.appVersion }}
strategy:
matrix:
include:
- platform: ubuntu-24.04
- platform: windows-latest
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
version: 11
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'pnpm'
- name: Install frontend dependencies
run: pnpm install
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-24.04'
run: |
sudo apt update;
sudo apt-get install -y libappindicator3-dev librsvg2-dev libudev-dev patchelf \
libwebkit2gtk-4.1-0=2.44.0-2 \
libwebkit2gtk-4.1-dev=2.44.0-2 \
libjavascriptcoregtk-4.1-0=2.44.0-2 \
libjavascriptcoregtk-4.1-dev=2.44.0-2 \
gir1.2-javascriptcoregtk-4.1=2.44.0-2 \
gir1.2-webkit2-4.1=2.44.0-2
- name: Build Tauri app and upload artifacts
uses: tauri-apps/tauri-action@v0
id: tauri
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
with:
tagName: __VERSION__
releaseName: '__VERSION__'
releaseDraft: true
publish:
runs-on: ubuntu-24.04
needs: build
steps:
- uses: actions/checkout@v6
- name: Download release assets
env:
GH_TOKEN: ${{ github.token }}
run: gh release download ${{ needs.build.outputs.appVersion }} --repo ${{ github.repository }}
- name: Move msi installer to bundle directory
run: |
mkdir -p src-tauri/target/release/bundle/msi
mv *.msi src-tauri/target/release/bundle/msi
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
- name: Install Thunderstore CLI
run: dotnet tool install -g tcli
- name: Publish to Thunderstore
env:
TCLI_AUTH_TOKEN: ${{ secrets.THUNDERSTORE_TOKEN }}
run: tcli publish --package-version ${{ needs.build.outputs.appVersion }}
- name: Update latest.json Github gist
uses: exuanbo/actions-deploy-gist@v1
with:
token: ${{ secrets.GIST_TOKEN }}
gist_id: 58b4f08009e7b7b5baaea253ebccb94d
gist_description: Auto-updater endpoint for gale
file_path: latest.json