publish #94
This file contains 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: 'publish' | |
on: workflow_dispatch | |
jobs: | |
publish-tauri: | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: 'ubuntu-22.04' | |
args: '' | |
- platform: 'windows-latest' | |
args: '--bundles msi' | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
- name: install dependencies (ubuntu only) | |
if: matrix.platform == 'ubuntu-22.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: install frontend dependencies | |
run: npm install | |
- 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__ # the action automatically replaces \_\_VERSION\_\_ with the app version. | |
releaseName: '__VERSION__' | |
releaseDraft: true | |
args: ${{ matrix.args }} | |
- name: setup .NET | |
if: matrix.platform == 'windows-latest' | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.405 | |
- name: clone thunderstore cli (fork) | |
uses: actions/checkout@v4 | |
if: matrix.platform == 'windows-latest' | |
with: | |
repository: Kesomannen/thunderstore-cli | |
path: tcli | |
- name: build thunderstore cli | |
if: matrix.platform == 'windows-latest' | |
working-directory: tcli/ThunderstoreCLI | |
run: dotnet build --configuration Release | |
- name: publish to thunderstore | |
if: matrix.platform == 'windows-latest' | |
env: | |
TCLI_AUTH_TOKEN: ${{ secrets.THUNDERSTORE_TOKEN }} | |
run: ./tcli/ThunderstoreCLI/bin/release/net7.0/tcli.exe publish --package-version ${{ steps.tauri.outputs.appVersion }} | |
- name: update latest.json github gist | |
uses: exuanbo/actions-deploy-gist@v1 | |
if: matrix.platform == 'windows-latest' | |
with: | |
token: ${{ secrets.GIST_TOKEN }} | |
gist_id: 58b4f08009e7b7b5baaea253ebccb94d | |
gist_description: Auto-updater endpoint for gale | |
file_path: latest.json |