Skip to content

🚀 .NET 8 and redid Sink config extensions (#8) #7

🚀 .NET 8 and redid Sink config extensions (#8)

🚀 .NET 8 and redid Sink config extensions (#8) #7

Workflow file for this run

name: Publish to Nuget.org
on:
push:
tags:
- "v*.*.*"
- "*.*.*"
permissions:
contents: write
packages: write
env:
DOTNET_NOLOGO: true
jobs:
build_and_create_a_nuget:
name: Build and create a NuGet package (GPR and NuGet.org)
runs-on: ubuntu-latest
steps:
- name: Calculate version from the Commit Tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
- run: dotnet restore --verbosity minimal
- run: dotnet build --configuration Release -p:ContinuousIntegrationBuild=true -p:version=${{ env.RELEASE_VERSION }}
- run: dotnet pack --configuration Release --no-build --output ./artifacts -p:version=${{ env.RELEASE_VERSION }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
- name: Publish artifacts
uses: actions/upload-artifact@v2
with:
path: ./artifacts/*
- name: Upload release assets
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: NuGetPackage.${{ env.RELEASE_VERSION }}.nupkg.zip
files: ./artifacts/*
- name: Publish to GPR
run: |
dotnet nuget push "./artifacts/*.nupkg" \
--no-symbols \
--api-key ${{ secrets.GITHUB_TOKEN }} \
--source https://nuget.pkg.github.com/${{ github.repository_owner }}
- name: Publish to nuget.org
run: |
dotnet nuget push "./artifacts/*.nupkg" \
--api-key ${{ secrets.NUGET_TOKEN }} \
--source https://api.nuget.org/v3/index.json