Skip to content

Merge pull request #50 from digirati-co-uk/feature/serialisation/expa… #163

Merge pull request #50 from digirati-co-uk/feature/serialisation/expa…

Merge pull request #50 from digirati-co-uk/feature/serialisation/expa… #163

Workflow file for this run

name: Build and push nuget
on:
create:
tags:
- 'v*'
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-push-nuget:
env:
BUILD_CONFIG: "Release"
SOLUTION: "IIIF.sln"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./src/IIIF
steps:
- name: Check out code
id: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.x"
- name: Determine GitVersion
uses: gittools/actions/gitversion/[email protected]
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Restore dependencies
run: nuget restore $SOLUTION
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
- name: Build
run: dotnet build $SOLUTION --configuration $BUILD_CONFIG --no-restore -p:ContinuousIntegrationBuild=true
- name: Test
run: dotnet test /p:Configuration=$BUILD_CONFIG --no-restore --no-build --verbosity normal
- name: Pack
run: dotnet pack IIIF/IIIF.csproj --configuration $BUILD_CONFIG -p:Version=$GITVERSION_NUGETVERSION --no-restore --no-build
- name: Publish Package and Symbols
if: startsWith(github.ref, 'refs/tags/v')
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}