Skip to content

Merge pull request #531 from ckadluba/530-fix-allownull-doc #75

Merge pull request #531 from ckadluba/530-fix-allownull-doc

Merge pull request #531 from ckadluba/530-fix-allownull-doc #75

Workflow file for this run

name: Release
on:
push:
branches: [ dev, main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-and-release:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Run build
run: ./Build.ps1 -SkipTests
- name: Read version from csproj
run: |
$selectResult = Select-String -Path ".\src\Serilog.Sinks.MSSqlServer\Serilog.Sinks.MSSqlServer.csproj" -Pattern '<VersionPrefix>(.+)</VersionPrefix>'
$versionMatch = $selectResult.Matches[0].Groups[1].Value
echo ("VERSION=" + $versionMatch) >> $env:GITHUB_ENV
echo "Found version $versionMatch"
- name: Create GitHub release
if: ${{ github.ref_name == 'main' }}
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
automatic_release_tag: "v${{ env.VERSION }}"
title: "v${{ env.VERSION }}"
files: |
artifacts/*.nupkg
artifacts/*.snupkg
- name: Publish to nuget.org
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: nuget push artifacts\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{ env.NUGET_API_KEY }}