Skip to content

Commit

Permalink
Sign win executable
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Apr 14, 2024
1 parent 9ccc46b commit fd04865
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/alpha-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
runs-on: ${{ matrix.os }}
env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -33,6 +36,11 @@ jobs:
with:
workspaces: "./core -> target"

- name: Install trusted-signing-cli
if: matrix.NAME == 'windows'
run: |
cargo install trusted-signing-cli
- name: "Apple silicon target"
if: matrix.NAME == 'mac'
run: |
Expand Down
1 change: 1 addition & 0 deletions core/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"build": {
"beforeBuildCommand": "npm run build:bundle",
"beforeDevCommand": "npm run server",
"beforeBundleCommand": "npm run sign",
"devPath": "http://localhost:3000",
"distDir": "../dist"
},
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"setup": "node scripts/buildNumber.cjs alpha false && node scripts/build.js",
"rename": "node scripts/rename.js",
"check": "svelte-check && tsc --noEmit && eslint .",
"sign": "node scripts/sign.js",
"tauri": "tauri"
},
"workspaces": [
Expand Down
12 changes: 12 additions & 0 deletions scripts/sign.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { exec } from "child_process"
import { platform } from "os"

if (platform() === "win32") {
exec("trusted-signing-cli -f ./core/target/release/Authme.exe -e https://eus.codesigning.azure.net -c mnr -n Profile1", (error, stdout) => {
if (error) {
return console.error(`Error: ${error}`)
}

console.log(`Result: ${stdout}`)
})
}

0 comments on commit fd04865

Please sign in to comment.