Skip to content

Release 0.1.1

Release 0.1.1 #6

Workflow file for this run

name: Publish a NuGet Package
on:
release:
types: [ published ]
env:
BRANCH: main
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build solution
run: dotnet build --configuration Release --no-restore
- name: Run tests
run: dotnet test --no-restore
- shell: pwsh
name: Create SNK File
env:
SNK: ${{ secrets.snk }}
run: |
$snk = [Convert]::FromBase64String("$env:SNK")
Set-Content "src\TextPrivacy.SensitiveString\SensitiveString.snk" -Value $snk -AsByteStream
- name: Build NuGet Package
run: dotnet pack src\TextPrivacy.SensitiveString\TextPrivacy.SensitiveString.csproj --configuration Publish -p:Repository=${{ github.repository }} -p:Branch=${{ env.BRANCH }} -p:Commit=${{ github.sha }}
- name: Publish NuGet Package
run: dotnet nuget push src\TextPrivacy.SensitiveString\bin\Publish\SensitiveString.*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.nuget_api_key }}