Skip to content

Add files required for Options binding #78

Add files required for Options binding

Add files required for Options binding #78

Workflow file for this run

name: Release
on:
push:
branches:
- main
- develop
- hotfix/**
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
outputs:
packageVersion: ${{ steps.gitversion.outputs.nuGetVersion }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.10.2
with:
versionSpec: '5.x'
- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: gittools/actions/gitversion/execute@v0.10.2
- name: Build
run: dotnet build -c Release
- name: Unit Test
run: dotnet test -c Release --no-build
package:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Package ready for deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Package
run: dotnet pack -c Release -o ./packages -p:PackageVersion=${{ needs.build.outputs.packageVersion }}
- name: Store nuget package as artifact
uses: actions/upload-artifact@v3
with:
name: packages
path: ./packages/*.nupkg
retention-days: 1
deploy:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Deploy to Nuget
needs: package
runs-on: ubuntu-latest
steps:
- name: Download package
uses: actions/download-artifact@v3
with:
name: packages
- name: Push to Nuget
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_KEY }}