Skip to content

Merge pull request #68 from IowaComputerGurus/feature/build-update #8

Merge pull request #68 from IowaComputerGurus/feature/build-update

Merge pull request #68 from IowaComputerGurus/feature/build-update #8

Workflow file for this run

name: Release Build
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
name: Build & Publish to NuGet
environment: nuget
env:
solution-path: './src/ICG NetCore Utilities.sln'
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Ensure .NET Installed
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.x
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '6.4.0'
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/[email protected]
- name: Restore Packages
run: dotnet restore "${{ env.solution-path }}"
- name: Build
run: dotnet build "${{ env.solution-path }}" --no-restore --configuration Release -p:version=${{ steps.gitversion.outputs.majorMinorPatch }}
- name: Test
run: dotnet test "${{ env.solution-path }}" --no-build --configuration Release
- name: Publish
run: dotnet nuget push **\*.nupkg -s 'https://api.nuget.org/v3/index.json' -k ${{secrets.ICG_NUGET_API_KEY}}