Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 20 additions & 19 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@ name: .NET Build
on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-22.04
build:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x
9.0.x
10.0.x
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x
9.0.x
10.0.x
11.0.x

- name: Restore dependencies
run: dotnet restore
- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore
- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --configuration Release --no-restore --no-build --verbosity normal
- name: Test
run: dotnet test --configuration Release --no-restore --no-build --verbosity normal
87 changes: 44 additions & 43 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
name: .NET Release

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
build:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Verify commit exists in origin/main
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/main
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x
9.0.x
10.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore /p:Version=${VERSION}

- name: Test
run: dotnet test --configuration Release --no-restore --no-build /p:Version=${VERSION}

- name: Pack
run: dotnet pack --configuration Release --no-restore --no-build /p:Version=${VERSION} --output .

- name: Push
run: dotnet nuget push *.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_TOKEN}
env:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
build:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Verify commit exists in origin/main
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/main
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x
9.0.x
10.0.x
11.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore /p:Version=${VERSION}

- name: Test
run: dotnet test --configuration Release --no-restore --no-build /p:Version=${VERSION}

- name: Pack
run: dotnet pack --configuration Release --no-restore --no-build /p:Version=${VERSION} --output .

- name: Push
run: dotnet nuget push *.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_TOKEN}
env:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
net8.0;
net9.0;
net10.0;
net11.0;
</TargetFrameworks>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>
Expand All @@ -23,8 +24,7 @@
</PropertyGroup>

<PropertyGroup>





</PropertyGroup>
</Project>
Loading