From ad793a8d3b88e981daf6393343ba96cb0e6d9f37 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Tue, 29 Jun 2021 23:13:26 +0200 Subject: [PATCH] Add GitHub Action for Releasing to NuGet --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..37cf635 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: release-pipeline + +on: + release: + types: + - created + + +jobs: + release-nuget: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + - name: Install dependencies + run: dotnet restore + - name: Run tests + run: dotnet test + - name: Build + run: dotnet build --configuration Release --no-restore + - name: Publish + uses: brandedoutcast/publish-nuget@v2 + with: + PROJECT_FILE_PATH: src/Serilog.Sinks.Loki/Serilog.Sinks.Loki.csproj + NUGET_KEY: ${{secrets.NUGET_API_KEY}} + NUGET_SOURCE: https://api.nuget.org + INCLUDE_SYMBOLS: true