mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	feat(signing): use environment variables for the executable path
This commit is contained in:
		
							
								
								
									
										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_TEAM_ID: ${{ env.APPLE_TEAM_ID }} | ||||||
|         APPLE_ID: ${{ env.APPLE_ID }} |         APPLE_ID: ${{ env.APPLE_ID }} | ||||||
|         APPLE_ID_PASSWORD: ${{ env.APPLE_ID_PASSWORD }} |         APPLE_ID_PASSWORD: ${{ env.APPLE_ID_PASSWORD }} | ||||||
|  |         WINDOWS_SIGN_EXECUTABLE: ${{ env.WINDOWS_SIGN_EXECUTABLE }} | ||||||
|       run: | |       run: | | ||||||
|         npm run electron-forge:make -- \ |         npm run electron-forge:make -- \ | ||||||
|           --arch=${{ inputs.arch }} \ |           --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_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | ||||||
|           APPLE_ID: ${{ secrets.APPLE_ID }} |           APPLE_ID: ${{ secrets.APPLE_ID }} | ||||||
|           APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} |           APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | ||||||
|  |           WINDOWS_SIGN_EXECUTABLE: ${{ vars.WINDOWS_SIGN_EXECUTABLE }} | ||||||
|  |  | ||||||
|       - name: Publish release |       - name: Publish release | ||||||
|         uses: softprops/action-gh-release@v2 |         uses: softprops/action-gh-release@v2 | ||||||
|   | |||||||
| @@ -1,8 +1,14 @@ | |||||||
| const child_process = require("child_process"); | const child_process = require("child_process"); | ||||||
| const SIGN_EXECUTABLE = "C:\\ev_signer_trilium\\ev_signer_trilium.exe"; |  | ||||||
|  |  | ||||||
| module.exports = function (filePath) { | 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}`); |     console.log(`[Sign] ${command}`); | ||||||
|     child_process.execSync(command); |     child_process.execSync(command); | ||||||
| } | } | ||||||
		Reference in New Issue
	
	Block a user