-
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 .Net SDK GHA to build and release strong named assemblies
- Loading branch information
1 parent
d262b7f
commit c63b3c6
Showing
2 changed files
with
49 additions
and
0 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,44 @@ | ||
name: Publish strong-named assemblies to NuGet | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
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 | ||
AAAAAAAAAAAAAAAAAAAAAA/file/sgKSM.snk > file:${{ github.workspace }}/sdk/dotNet/SecretsManager/sgKSM.snk | ||
- name: Install dependencies | ||
run: dotnet restore | ||
|
||
- name: Build | ||
run: dotnet build --configuration Release --no-restore -p:SignKSM=True | ||
|
||
- name: Cleanup temp files | ||
run: rm -f ./SecretsManager/sgKSM.snk | ||
|
||
- name: Publish package | ||
run: dotnet nuget push ./SecretsManager/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