feat(updater): bake Tauri public key into config; remove key injection steps; bump desktop to 0.1.4
This commit is contained in:
parent
55791a0503
commit
81ff7211ee
3 changed files with 2 additions and 24 deletions
8
.github/workflows/ci-cd-web-desktop.yml
vendored
8
.github/workflows/ci-cd-web-desktop.yml
vendored
|
|
@ -332,8 +332,6 @@ jobs:
|
||||||
name: Desktop Release (Windows)
|
name: Desktop Release (Windows)
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||||
runs-on: [ self-hosted, windows, desktop ]
|
runs-on: [ self-hosted, windows, desktop ]
|
||||||
env:
|
|
||||||
TAURI_PUBLIC_KEY: ${{ secrets.TAURI_PUBLIC_KEY }}
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: apps/desktop
|
working-directory: apps/desktop
|
||||||
|
|
@ -364,12 +362,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
projectPath: apps/desktop
|
projectPath: apps/desktop
|
||||||
|
|
||||||
- name: Inject Tauri public key (post)
|
|
||||||
if: ${{ env.TAURI_PUBLIC_KEY != '' }}
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
$p = 'apps/desktop/src-tauri/tauri.conf.json'
|
|
||||||
(Get-Content $p) -replace 'REPLACE_WITH_TAURI_PUBLIC_KEY', $env:TAURI_PUBLIC_KEY | Set-Content $p
|
|
||||||
|
|
||||||
- name: Upload latest.json + bundles to VPS
|
- name: Upload latest.json + bundles to VPS
|
||||||
uses: appleboy/scp-action@v0.1.7
|
uses: appleboy/scp-action@v0.1.7
|
||||||
|
|
|
||||||
14
.github/workflows/desktop-release.yml
vendored
14
.github/workflows/desktop-release.yml
vendored
|
|
@ -13,8 +13,6 @@ jobs:
|
||||||
build:
|
build:
|
||||||
name: Build ${{ matrix.platform }}
|
name: Build ${{ matrix.platform }}
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
env:
|
|
||||||
TAURI_PUBLIC_KEY: ${{ secrets.TAURI_PUBLIC_KEY }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -52,18 +50,6 @@ jobs:
|
||||||
- name: Install pnpm deps
|
- name: Install pnpm deps
|
||||||
run: pnpm -C apps/desktop install --frozen-lockfile
|
run: pnpm -C apps/desktop install --frozen-lockfile
|
||||||
|
|
||||||
- name: Inject Tauri public key (Linux/macOS)
|
|
||||||
if: ${{ env.TAURI_PUBLIC_KEY != '' && matrix.platform != 'windows' }}
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
sed -i "s/REPLACE_WITH_TAURI_PUBLIC_KEY/${TAURI_PUBLIC_KEY//\//\\\/}/" apps/desktop/src-tauri/tauri.conf.json
|
|
||||||
|
|
||||||
- name: Inject Tauri public key (Windows)
|
|
||||||
if: ${{ env.TAURI_PUBLIC_KEY != '' && matrix.platform == 'windows' }}
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
$p = 'apps/desktop/src-tauri/tauri.conf.json'
|
|
||||||
(Get-Content $p) -replace 'REPLACE_WITH_TAURI_PUBLIC_KEY', $env:TAURI_PUBLIC_KEY | Set-Content $p
|
|
||||||
|
|
||||||
- name: Build desktop
|
- name: Build desktop
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "Raven",
|
"productName": "Raven",
|
||||||
"version": "0.1.3",
|
"version": "0.1.4",
|
||||||
"identifier": "br.com.esdrasrenan.sistemadechamados",
|
"identifier": "br.com.esdrasrenan.sistemadechamados",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "pnpm run dev",
|
"beforeDevCommand": "pnpm run dev",
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
"https://github.com/esdrasrenan/sistema-de-chamados/releases/latest/download/latest.json"
|
"https://github.com/esdrasrenan/sistema-de-chamados/releases/latest/download/latest.json"
|
||||||
],
|
],
|
||||||
"dialog": true,
|
"dialog": true,
|
||||||
"pubkey": "REPLACE_WITH_TAURI_PUBLIC_KEY"
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEM1RkE0NkZFMTM0NTA4N0MKUldSOENFVVQva2I2eFZ5TTA0WitpZGRPUXVmbUtjNXNleXlYb1ZKWVlERlZiVzYybUptT1pINlgK"
|
||||||
},
|
},
|
||||||
"bundle": {
|
"bundle": {
|
||||||
"active": true,
|
"active": true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue