75 lines
2.5 KiB
YAML
75 lines
2.5 KiB
YAML
name: 'publish'
|
|
on:
|
|
push:
|
|
branches:
|
|
- production
|
|
workflow_dispatch: {}
|
|
|
|
jobs:
|
|
publish-tauri:
|
|
permissions:
|
|
contents: write
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform: [ubuntu-latest,macos-latest,windows-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: setup node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 21
|
|
- id: set_var_win
|
|
if: matrix.platform == 'windows-latest'
|
|
run: |
|
|
choco install jq -y
|
|
- id: set_var
|
|
shell: bash
|
|
run: |
|
|
echo "VERSION_JSON=$(jq -c . < version.json)" >> $GITHUB_ENV
|
|
- name: "Set TAURI_PRIVATE_KEY env variable for signing"
|
|
shell: bash
|
|
run: |
|
|
export TAURI_PRIVATE_KEY="${{ secrets.TAURI_PRIVATE_KEY }}"
|
|
export TAURI_KEY_PASSWORD="${{ secrets.TAURI_KEY_PASSWORD }}"
|
|
- name: install pnpm
|
|
uses: pnpm/action-setup@v3
|
|
with:
|
|
version: latest
|
|
- name: install dependencies (ubuntu only)
|
|
if: matrix.platform == 'ubuntu-latest'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
|
|
- name: Get pnpm store directory
|
|
id: pnpm-cache
|
|
shell: bash
|
|
run: |
|
|
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
|
- uses: actions/cache@v4
|
|
name: Setup pnpm cache
|
|
with:
|
|
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
- name: install frontend dependencies
|
|
run: pnpm install --no-frozen-lockfile # change this to npm or pnpm depending on which one you use
|
|
- if: matrix.platform == 'macos-latest'
|
|
run: rustup target add x86_64-apple-darwin
|
|
- if: matrix.platform == 'macos-latest'
|
|
run: rustup target add aarch64-apple-darwin
|
|
- uses: tauri-apps/tauri-action@v0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tagName: 'v__VERSION__' # the action automatically replaces \_\_VERSION\_\_ with the app version.
|
|
releaseName: 'v__VERSION__'
|
|
releaseBody: 'Release of v__VERSION__'
|
|
releaseDraft: true
|
|
prerelease: false
|
|
args: ${{ matrix.settings.args }}
|
|
tauriScript: "pnpm tauri"
|