default serviceType to "docker" + rename chatId to historyId (#548) #50
Workflow file for this run
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: On Tag | |
on: | |
push: | |
tags: ["v*"] | |
jobs: | |
publish-tauri: | |
permissions: write-all | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [macos-latest, ubuntu-20.04] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Rust setup | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install Linux tauri dependencies | |
if: startsWith(matrix.platform, 'ubuntu') | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: Install missing Rust target for universal Mac build | |
if: startsWith(matrix.platform, 'macos') | |
run: rustup target add aarch64-apple-darwin | |
- uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: "./src-tauri -> target" | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "lts/*" | |
cache: npm | |
- run: npm install | |
- name: metadata | |
id: metadata | |
run: | | |
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
- name: Update with latest main branch | |
run: | | |
git config --local user.email "$(git log --format='%ae' HEAD^!)" | |
git config --local user.name "$(git log --format='%an' HEAD^!)" | |
git config pull.rebase true | |
git stash | |
git fetch origin main | |
git pull origin main | |
git stash pop || true | |
- uses: actions/setup-go@v4 | |
with: {go-version: ^1.20.1} | |
id: go | |
- name: Install dasel | |
run: 'go install github.com/tomwright/dasel/cmd/dasel@latest' | |
- name: Increment version | |
run: | | |
dasel put string -f package.json ".version" "${{ steps.metadata.outputs.version }}" | |
dasel put string -f src-tauri/tauri.conf.json ".package.version" "${{ steps.metadata.outputs.version }}" | |
dasel put string -f src-tauri/Cargo.toml ".package.version" "${{ steps.metadata.outputs.version }}" | |
- name: Build the app | |
uses: tauri-apps/tauri-action@dev | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }} | |
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
with: | |
tagName: ${{ steps.metadata.outputs.tag }} | |
releaseName: "PremAI App ${{ steps.metadata.outputs.tag }}" | |
releaseBody: "See the assets to download and install this version." | |
releaseDraft: false | |
includeDebug: true | |
updaterJsonKeepUniversal: true | |
args: ${{startsWith(matrix.platform, 'ubuntu') && '--target x86_64-unknown-linux-gnu' || '--target universal-apple-darwin'}} | |
- name: Commit & Push | |
run: | | |
# Commit package.json, tauri.conf.json, Cargo.toml | |
git add . | |
git commit -m "${{ steps.metadata.outputs.tag }}" | |
git push origin HEAD:main |