Skip to content

Commit 4a54a37

Browse files
committed
chore: self sign tauri
1 parent ba003c3 commit 4a54a37

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.github/workflows/template-build-macos.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,20 @@ jobs:
174174
p12-file-base64: ${{ secrets.CODE_SIGN_P12_BASE64 }}
175175
p12-password: ${{ secrets.CODE_SIGN_P12_PASSWORD }}
176176

177+
- name: Inject Tauri Signing Public Key
178+
run: |
179+
if [ -f "src-tauri/tauri.conf.json" ]; then
180+
echo "Injecting Tauri public key into configuration..."
181+
# Use jq to update the pubkey field in the tauri.conf.json file
182+
jq --arg pubkey "$TAURI_SIGNING_PUBLIC_KEY" '.plugins.updater.pubkey = $pubkey' src-tauri/tauri.conf.json > /tmp/tauri.conf.json
183+
mv /tmp/tauri.conf.json src-tauri/tauri.conf.json
184+
echo "Tauri configuration updated successfully"
185+
else
186+
echo "tauri.conf.json not found"
187+
fi
188+
env:
189+
TAURI_SIGNING_PUBLIC_KEY: ${{ secrets.TAURI_SIGNING_PUBLIC_KEY }}
190+
177191
- name: Build and publish app to aws s3 r2 or github artifactory
178192
if: inputs.public_provider != 'github'
179193
run: |
@@ -205,6 +219,9 @@ jobs:
205219
APPLE_API_ISSUER: ${{ secrets.NOTARY_ISSUER }}
206220
APPLE_API_KEY: ${{ secrets.NOTARY_KEY_ID }}
207221
APPLE_API_KEY_PATH: /tmp/notary-key.p8
222+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
223+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
224+
TAURI_SIGNING_PUBLIC_KEY: ${{ secrets.TAURI_SIGNING_PUBLIC_KEY }}
208225

209226
- name: Build and publish app to github
210227
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && inputs.public_provider == 'github' && inputs.beta == false
@@ -226,6 +243,9 @@ jobs:
226243
APPLE_API_ISSUER: ${{ secrets.NOTARY_ISSUER }}
227244
APPLE_API_KEY: ${{ secrets.NOTARY_KEY_ID }}
228245
APPLE_API_KEY_PATH: /tmp/notary-key.p8
246+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
247+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
248+
TAURI_SIGNING_PUBLIC_KEY: ${{ secrets.TAURI_SIGNING_PUBLIC_KEY }}
229249

230250
- name: Build and publish app to github
231251
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && inputs.public_provider == 'github' && inputs.beta == true

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"bundle": {
5757
"active": true,
5858
"targets": "all",
59-
"createUpdaterArtifacts": false,
59+
"createUpdaterArtifacts": true,
6060
"icon": [
6161
"icons/32x32.png",
6262
"icons/128x128.png",

0 commit comments

Comments
 (0)