-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* KSM-360 - GHA to build and release strong named assemblies * KSM-490 - Switch some internal classes to public - for use in plugins * KSM-515 - Update to Bouncy Castle 2.4.0 * KSM-536 - Update to System.Text.Json 8.0.4 * KSM-517 - Add support for netstandard2.0 target * KSM-542 - Fix PowerShell module to allow dot in title
- Loading branch information
1 parent
d85e303
commit 2eccd41
Showing
24 changed files
with
415 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Publish strong-named assemblies to NuGet | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
publish: | ||
description: 'Publish to NuGet (uncheck to build only)' | ||
required: false | ||
default: 'true' | ||
type: boolean | ||
|
||
|
||
jobs: | ||
publish-nuget: | ||
environment: prod | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./sdk/dotNet | ||
|
||
steps: | ||
- name: Get the source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET 6 | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 6.0.x | ||
|
||
- name: Retrieve secrets from KSM | ||
id: ksmsecrets | ||
uses: Keeper-Security/ksm-action@master | ||
with: | ||
keeper-secret-config: ${{ secrets.KSM_KSM_CONFIG }} | ||
secrets: | | ||
Sq4nnb5HXXNp1l6KryXynw/field/password > NUGET_AUTH_TOKEN | ||
Sq4nnb5HXXNp1l6KryXynw/file/sgKSM.snk > file:${{ github.workspace }}/sdk/dotNet/SecretsManager/sgKSM.snk | ||
- name: Install dependencies | ||
run: dotnet restore | ||
|
||
- name: "Preparing package for strong naming" | ||
working-directory: ./SecretsManager | ||
run: | | ||
pwd | ||
ls -lah | ||
cp -f SecretsManager.csproj SecretsManager.StrongName.csproj | ||
ls -lah | ||
sed -i 's/<PackageId>Keeper.SecretsManager<\/PackageId>/<PackageId>Keeper.SecretsManager.StrongName<\/PackageId>/g' SecretsManager.StrongName.csproj | ||
cat SecretsManager.StrongName.csproj | ||
- name: Build | ||
working-directory: ./SecretsManager | ||
run: | | ||
pwd | ||
ls -lah | ||
dotnet build SecretsManager.StrongName.csproj --configuration Release --no-restore -p:SignKSM=True | ||
- name: Cleanup temp files | ||
working-directory: ./SecretsManager | ||
run: | | ||
ls -lah | ||
rm -f sgKSM.snk | ||
- name: Publish package | ||
if: ${{ github.event.inputs.publish == 'true' }} | ||
working-directory: ./SecretsManager | ||
run: | | ||
ls -lah ./bin/Release/ | ||
dotnet nuget push bin/Release/*.nupkg --api-key ${{steps.ksmsecrets.outputs.NUGET_AUTH_TOKEN}} --source https://api.nuget.org/v3/index.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[*] | ||
|
||
# Indentation and spacing | ||
indent_size = 4 | ||
indent_style = space | ||
tab_width = 4 | ||
|
||
# New line preferences | ||
end_of_line = lf | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...anagement.Keeper/SecretManagement.Keeper.Extension/SecretManagement.Keeper.Extension.psd1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
@{ | ||
ModuleVersion = '16.6.4' | ||
ModuleVersion = '16.6.6' | ||
RootModule = 'SecretManagement.Keeper.Extension.psm1' | ||
RequiredAssemblies = '../SecretManagement.Keeper.dll' | ||
CompatiblePSEditions = @('Core') | ||
GUID = '7ad471fa-c303-4e0f-8da7-4b4b6da380f9' | ||
Author = 'Sergey Aldoukhov' | ||
CompanyName = 'Keeper Security' | ||
Copyright = '(c) 2023 Keeper Security, Inc.' | ||
Copyright = '(c) 2024 Keeper Security, Inc.' | ||
FunctionsToExport = 'Set-Secret', 'Get-Secret', 'Remove-Secret', 'Get-SecretInfo', 'Test-SecretVault', 'Set-KeeperVault', 'Get-Notation' | ||
CmdletsToExport = @() | ||
VariablesToExport = @() | ||
AliasesToExport = @() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
sdk/dotNet/SecretManagement.Keeper/SecretManagement.Keeper.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.