Skip to content

Commit

Permalink
ci: skip connecting to key locker if api token is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Oct 27, 2023
1 parent 0a47f35 commit 854c195
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/package.yml
Expand Up @@ -71,7 +71,7 @@ jobs:
shell: bash

- name: Setting up the client tools
if: matrix.os == 'windows-2019'
if: ${{ matrix.os == 'windows-2019' && env.SM_API_KEY != '' }}
run: |
curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o smtools-windows-x64.msi
msiexec /i smtools-windows-x64.msi /quiet /qn
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/package_for_test.yml
Expand Up @@ -82,15 +82,15 @@ jobs:
shell: bash

- name: Setting up the client tools
if: matrix.os == 'windows-2019'
if: ${{ matrix.os == 'windows-2019' && env.SM_API_KEY != '' }}
run: |
curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o smtools-windows-x64.msi
msiexec /i smtools-windows-x64.msi /quiet /qn
C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user
shell: cmd

- name: Certificates Sync
if: matrix.os == 'windows-2019'
if: ${{ matrix.os == 'windows-2019' && env.SM_API_KEY != '' }}
run: |
smctl windows certsync
shell: cmd
Expand Down
5 changes: 5 additions & 0 deletions packages/neuron-wallet/scripts/customSign.js
@@ -1,6 +1,11 @@
const { execSync } = require('node:child_process')

exports.default = async configuration => {
if (!process.env.SM_API_KEY) {
console.info(`Skip signing because SM_API_KEY and not configured`)
return
}

if (!configuration.path) {
throw new Error(`Path of application is not found`)
}
Expand Down

1 comment on commit 854c195

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 6662786994

Please sign in to comment.