Skip to content

Release 2.1.0

Release 2.1.0 #73

Workflow file for this run

name: Publish a NuGet Package
on:
release:
types: [ published ]
env:
BRANCH: master
# remove and adjust building a nuget package to the latest requirements
NUGET_ENABLE_LEGACY_CSPROJ_PACK: true
defaults:
run:
working-directory: src
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Setup NuGet.exe
uses: nuget/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.nuget_api_key }}
nuget-version: 'latest'
- 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 "Solution Items\GiGraph.snk" -Value $snk -AsByteStream
- name: Build NuGet Package
run: |
nuget pack "GiGraph.Dot\GiGraph.Dot.csproj" -Build -Symbols -Properties "Configuration=Publish;repository=${{ github.repository }};branch=${{ env.BRANCH }};commit=${{ github.sha }}" -IncludeReferencedProjects -SymbolPackageFormat snupkg -OutputFileNamesWithoutVersion
- name: Publish NuGet Package
run: |
nuget push GiGraph.Dot.nupkg -Source https://api.nuget.org/v3/index.json