Skip to content

2.1.0 Release

2.1.0 Release #199

Workflow file for this run

name: .NET Core
on:
push:
tags:
- '*'
branches:
- develop
pull_request:
branches: [ master, develop, release/**, hotfix/** ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# Setup .Net SDKs
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
# Perform the dotnet actions
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-restore --configuration Release
# Get the version information
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
if: ${{ success() && contains(github.event_name, 'push') }}
with:
versionSpec: '5.x'
- name: Determine Version
uses: gittools/actions/gitversion/[email protected]
if: ${{ success() && contains(github.event_name, 'push') }}
with:
useConfigFile: true
- name: Display SemVer
if: ${{ success() && contains(github.event_name, 'push') }}
run: |
echo "SemVer: $GITVERSION_SEMVER"
# Package and publish
- name: Package
if: ${{ success() && contains(github.event_name, 'push') }}
run: dotnet pack --no-build --configuration Release --output ./Packages -p:PackageVersion=$GITVERSION_SEMVER
- name: Push
if: ${{ success() && contains(github.event_name, 'push') }}
run: |
cd Packages
dotnet nuget push "*.nupkg" --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}