Skip to content

v3.0.1.1

v3.0.1.1 #3

Workflow file for this run

name: Build and Publish NuGet
on:
release:
types: [created]
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Extract release version
id: release_version
run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF#refs/tags/} | cut -c 2-)" >> $GITHUB_ENV
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Pack
run: dotnet pack ./src/X.Serilog.Sinks.Telegram/X.Serilog.Sinks.Telegram.csproj --configuration Release --no-build --output nupkgs /p:PackageVersion=${{ env.RELEASE_VERSION }}
- name: Push to NuGet
run: dotnet nuget push "nupkgs/**/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json