Skip to content

Commit

Permalink
Fix windows sign
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed May 14, 2024
1 parent 3b19436 commit 93f108c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
19 changes: 3 additions & 16 deletions .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,9 @@ jobs:
path: package.json
prop_path: version

# Sign the installer
- name: Sign files with Azure Code Signing
if: runner.os == 'Windows'
uses: azure/trusted-signing-action@v0.3.15
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: https://eus.codesigning.azure.net/
code-signing-account-name: mnr
certificate-profile-name: profile1
files-folder: "./core/target/release/upload"
files-folder-filter: msi
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Sign windows installer
run: |
npm run sign ./core/target/release/upload/authme-${{steps.version.outputs.prop}}-windows-x64.msi
# Windows
- name: Upload the windows installer asset
Expand Down
2 changes: 1 addition & 1 deletion core/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"build": {
"beforeBuildCommand": "npm run build:bundle",
"beforeDevCommand": "npm run server",
"beforeBundleCommand": "npm run sign",
"beforeBundleCommand": "npm run sign ./core/target/release/Authme.exe",
"devPath": "http://localhost:3000",
"distDir": "../dist"
},
Expand Down
4 changes: 2 additions & 2 deletions scripts/sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { exec } from "child_process"
import { platform } from "os"

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

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

0 comments on commit 93f108c

Please sign in to comment.