Skip to content

use correct framework #33

use correct framework

use correct framework #33

Workflow file for this run

name: Build Windows
on: [push, pull_request]
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Build Reason
run: "echo ref: ${{github.ref}} event: ${{github.event_name}}"
- name: Build Version
shell: bash
run: |
dotnet tool install --global minver-cli --version 5.0.0
version=$(minver --tag-prefix v)
echo "MINVERVERSIONOVERRIDE=$version" >> $GITHUB_ENV
- name: Build
run: dotnet build --configuration Release Serilog.Sinks.Exceptionless.sln
- name: Run Tests
run: dotnet test --configuration Release --no-build Serilog.Sinks.Exceptionless.sln
- name: Package
if: github.event_name != 'pull_request'
run: dotnet pack --configuration Release --no-build Serilog.Sinks.Exceptionless.sln
- name: Install GitHub Package Tool
if: github.event_name != 'pull_request'
run: dotnet tool install gpr -g
- name: Publish CI Packages
shell: bash
if: github.event_name != 'pull_request'
run: |
for package in $(find -name "*.nupkg" | grep "minver" -v); do
echo "${0##*/}": Pushing $package...
# GitHub
gpr push $package -k ${{ secrets.GITHUB_TOKEN }} || true
done
- name: Publish Release Packages
shell: bash
if: startsWith(github.ref, 'refs/tags/v')
run: |
for package in $(find -name "*.nupkg" | grep "minver" -v); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate
done