Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
tippmar-nr committed Jun 26, 2023
1 parent d6b0db7 commit 0e7130b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/all_solutions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ on:
workflow_dispatch:
inputs:
build-for-release:
description: 'Set to "true" when manually building for a release. Otherwise, "False"'
description: 'Set to true when manually building for a release. Otherwise, false'
required: true
default: 'false'
type: boolean
default: false

schedule:
- cron: "0 9 * * *"
Expand Down Expand Up @@ -96,7 +97,7 @@ jobs:
if-no-files-found: error

- name: Convert Code Signing Certificate Into File
if: ${{ github.event.release }} || (github.event_name == 'workflow_dispatch' && ${{ inputs.build-for-release == 'true' }})
if: ${{ github.event.release }} || (github.event_name == 'workflow_dispatch' && ${{ github.event.inputs.build-for-release }})
id: write_cert
run: |
$filePath = '${{ github.workspace }}\newrelic_code_sign_cert.pfx'
Expand All @@ -106,14 +107,14 @@ jobs:
shell: powershell

- name: Install Code Signing Certificate
if: ${{ github.event.release }} || (github.event_name == 'workflow_dispatch' && ${{ inputs.build-for-release == 'true' }})
if: ${{ github.event.release }} || (github.event_name == 'workflow_dispatch' && ${{ github.event.inputs.build-for-release }})
run: |
Write-Host "certutil.exe -f -user -p <passphrase> -importPFX ${{ steps.write_cert.outputs.filePath }} NoRoot"
certutil.exe -f -user -p ${{ secrets.CERT_PASSPHRASE }} -importPFX ${{ steps.write_cert.outputs.filePath }} NoRoot
shell: powershell

- name: Create Self-signed code signing cert
if: github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && ${{ inputs.build-for-release != 'true' }}) || github.event_name == 'schedule'
if: github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && !${{ github.event.inputs.build-for-release }}) || github.event_name == 'schedule'
run: |
Write-Host "New-SelfSignedCertificate -DnsName "Self-signed code signing cert" -Type CodeSigning -CertStoreLocation Cert:\CurrentUser\My -NotAfter (Get-Date).AddYears(100)"
New-SelfSignedCertificate -DnsName "Self-signed code signing cert" -Type CodeSigning -CertStoreLocation Cert:\CurrentUser\My -NotAfter (Get-Date).AddYears(100)
Expand Down

0 comments on commit 0e7130b

Please sign in to comment.