mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
feat(signing): use environment variables for the executable path
This commit is contained in:
parent
3413c5e401
commit
34043a8a70
1
.github/actions/build-electron/action.yml
vendored
1
.github/actions/build-electron/action.yml
vendored
@ -79,6 +79,7 @@ runs:
|
||||
APPLE_TEAM_ID: ${{ env.APPLE_TEAM_ID }}
|
||||
APPLE_ID: ${{ env.APPLE_ID }}
|
||||
APPLE_ID_PASSWORD: ${{ env.APPLE_ID_PASSWORD }}
|
||||
WINDOWS_SIGN_EXECUTABLE: ${{ env.WINDOWS_SIGN_EXECUTABLE }}
|
||||
run: |
|
||||
npm run electron-forge:make -- \
|
||||
--arch=${{ inputs.arch }} \
|
||||
|
1
.github/workflows/nightly.yml
vendored
1
.github/workflows/nightly.yml
vendored
@ -50,6 +50,7 @@ jobs:
|
||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||
WINDOWS_SIGN_EXECUTABLE: ${{ vars.WINDOWS_SIGN_EXECUTABLE }}
|
||||
|
||||
- name: Publish release
|
||||
uses: softprops/action-gh-release@v2
|
||||
|
@ -1,8 +1,14 @@
|
||||
const child_process = require("child_process");
|
||||
const SIGN_EXECUTABLE = "C:\\ev_signer_trilium\\ev_signer_trilium.exe";
|
||||
|
||||
module.exports = function (filePath) {
|
||||
const command = `${SIGN_EXECUTABLE} --executable "${filePath}"`;
|
||||
const { WINDOWS_SIGN_EXECUTABLE } = process.env;
|
||||
|
||||
if (!WINDOWS_SIGN_EXECUTABLE) {
|
||||
console.warn("[Sign] Skip signing due to missing environment variable.");
|
||||
return;
|
||||
}
|
||||
|
||||
const command = `${WINDOWS_SIGN_EXECUTABLE} --executable "${filePath}"`;
|
||||
console.log(`[Sign] ${command}`);
|
||||
child_process.execSync(command);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user