Skip to content

Commit

Permalink
ci: Fix code signing on Windows (#2346)
Browse files Browse the repository at this point in the history
  • Loading branch information
taratatach authored Oct 10, 2024
2 parents b5531c0 + dd48e81 commit 1958ce0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ before_build:
- ps: if ($env:BUILD_JOB -eq "build") { pwsh -NoProfile -ExecutionPolicy Unrestricted -Command .\build\windows\setup-keylocker.ps1 }

build_script:
- ps: $env:SKIP_CODE_SIGNING=($env:APPVEYOR_REPO_BRANCH -ne "master")
- ps: $env:SIGN_CODE=( ($env:APPVEYOR_REPO_BRANCH -eq "master" ) -and ($env:APPVEYOR_REPO_TAG -eq 'true') )
- ps: if ($env:BUILD_JOB -eq "build") { yarn dist }

artifacts:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
push:
branches:
- master
tags:
- '**'
pull_request:
paths-ignore:
- '.github/workflows/macos.yaml'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
push:
branches:
- master
tags:
- '**'
pull_request:
paths-ignore:
- '.github/workflows/linux.yaml'
Expand Down
4 changes: 2 additions & 2 deletions build/windows/customSign.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict'

exports.default = async function (configuration) {
if (process.env.SKIP_CODE_SIGNING === 'True') {
if (process.env.SIGN_CODE !== 'True') {
// eslint-disable-next-line no-console
console.log('Skipping code signing')
return
Expand All @@ -26,7 +26,7 @@ exports.default = async function (configuration) {

try {
const signCommand = `.\\build\\windows\\sign.ps1`
const keyPairAlias = `"${process.env.KEYPAIR_ALIAS}"`
const keyPairAlias = `"${process.env.SM_KEYPAIR_ALIAS}"`
const sign = [
`pwsh`,
`-NoProfile`,
Expand Down

0 comments on commit 1958ce0

Please sign in to comment.