Skip to content

Commit

Permalink
Merge pull request #51 from ironmansoftware/winformdesigner
Browse files Browse the repository at this point in the history
Signing and Save Shortcut.
  • Loading branch information
adamdriscoll authored Jul 5, 2024
2 parents 0697b2f + 6c47ebc commit 202d4ec
Show file tree
Hide file tree
Showing 19 changed files with 348 additions and 216 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/cmdlets.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
dotnet publish -f net472 -c Release .\IronmanPowerShellHost.csproj
Pop-Location
- name: Build PSScriptPad
- name: Build Windows Form Designer
shell: pwsh
run: |
msbuild PowerShellTools.sln -t:rebuild -p:Configuration=Release -p:Platform=x64
Expand All @@ -51,4 +51,6 @@ jobs:
run: |
.\PowerShellToolsPro.Cmdlets\build.ps1
env:
SIGNING_CODE: ${{ secrets.SIGNING_CODE }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
6 changes: 4 additions & 2 deletions .github/workflows/cmdlets.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
dotnet publish -f net472 -c Release .\IronmanPowerShellHost.csproj
Pop-Location
- name: Build PSScriptPad
- name: Build Windows Form Designer
shell: pwsh
run: |
msbuild PowerShellTools.sln -t:rebuild -p:Configuration=Release -p:Platform=x64
Expand All @@ -46,7 +46,9 @@ jobs:
run: |
.\PowerShellToolsPro.Cmdlets\build.ps1
env:
SIGNING_CODE: ${{ secrets.SIGNING_CODE }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}

- name: Publish
shell: pwsh
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/vscode.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,21 @@ jobs:
dotnet publish -f net472 -c Release .\IronmanPowerShellHost.csproj
Pop-Location
- name: Build PSScriptPad
- name: Build Windows Form Designer
shell: pwsh
run: |
msbuild PowerShellTools.sln -t:rebuild -p:Configuration=Release -p:Platform=x64
- name: Build
shell: pwsh
run: |
Install-Module InvokeBuild -Scope CurrentUser -Force
Install-Module PlatyPS -Scope CurrentUser -Force
Invoke-Build -File .\vscode\vscode.build.ps1
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}

- name: Upload Artifact
uses: actions/upload-artifact@v3
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/vscode.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
Install-Module InvokeBuild -Scope CurrentUser -Force
Install-Module PlatyPS -Scope CurrentUser -Force
Invoke-Build -File .\vscode\vscode.build.ps1
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}

- name: Publish
shell: pwsh
Expand All @@ -53,5 +57,4 @@ jobs:
vsce publish --pat $ENV:VSCE --packagePath ".\kit\powershellprotools-$($Version).vsix"
env:
VSCE: ${{ secrets.VSCE }}
VSCODE_SAS: ${{ secrets.VSCODE_SAS }}
VSCE: ${{ secrets.VSCODE_MARKETPLACE_KEY }}
21 changes: 21 additions & 0 deletions Build/sign.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
param($Path)

$OpenAuthenticode = Import-Module OpenAuthenticode -PassThru -ErrorAction Ignore
if ($null -eq $OpenAuthenticode) {
Install-Module OpenAuthenticode -Force -Scope CurrentUser -AllowClobber
}

$key = Get-OpenAuthenticodeAzKey -Vault ims-hms2 -Certificate Global-Sign-Cert -ErrorAction SilentlyContinue

if ($null -eq $Key) {
Write-Warning "No signing key available. Skipping signing."
return
}

$signParams = @{
Key = $key
TimeStampServer = "http://timestamp.globalsign.com/tsa/r6advanced1"
HashAlgorithm = 'SHA256'
}

Set-OpenAuthenticodeSignature -FilePath $Path @signParams
15 changes: 7 additions & 8 deletions PowerShellToolsPro.Cmdlets/PowerShellProTools.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Ironman Software, LLC
#
# Generated on: 7/3/2024
# Generated on: 7/5/2024
#

@{
Expand All @@ -12,13 +12,13 @@
RootModule = 'PowerShellProTools.psm1'

# Version number of this module.
ModuleVersion = '2024.3.0'
ModuleVersion = '2024.7.0'

# Supported PSEditions
# CompatiblePSEditions = @()

# ID used to uniquely identify this module
GUID = 'a1c11aea-84ef-4f8f-a278-0b828fbf1851'
GUID = 'd44473ef-95fa-4b2c-a169-bf3ccfa2da97'

# Author of this module
Author = 'Ironman Software, LLC'
Expand All @@ -30,7 +30,7 @@ CompanyName = 'Unknown'
Copyright = 'Ironman Software, LLC'

# Description of the functionality provided by this module
Description = 'PowerShell script packaging, profiling, WPF and Windows Forms design, and desktop automation.'
Description = 'PowerShell script packaging and Windows Forms design.'

# Minimum version of the PowerShell engine required by this module
# PowerShellVersion = ''
Expand Down Expand Up @@ -72,15 +72,14 @@ NestedModules = @('PowerShellToolsPro.Cmdlets.dll')
FunctionsToExport = '*'

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = 'Merge-Script', 'Measure-Block', 'Measure-Script',
'Show-WinFormDesigner', 'ConvertTo-WinForm', 'Show-PSScriptPad',
'Set-Hotkey', 'Get-Hotkey', 'Remove-Hotkey'
CmdletsToExport = 'Merge-Script', 'Show-WinFormDesigner', 'ConvertTo-WinForm',
'Show-PSScriptPad'

# Variables to export from this module
VariablesToExport = '*'

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = 'pad'
AliasesToExport = '*'

# DSC resources to export from this module
# DscResourcesToExport = @()
Expand Down
Loading

0 comments on commit 202d4ec

Please sign in to comment.