Skip to content

Merge pull request #2 from OfficeForProductSafetyAndStandards/dotnet8… #47

Merge pull request #2 from OfficeForProductSafetyAndStandards/dotnet8…

Merge pull request #2 from OfficeForProductSafetyAndStandards/dotnet8… #47

Workflow file for this run

name: Build
on:
push:
branches:
main
workflow_dispatch:
env:
DOTNET_VERSION: '8.0.x'
CONFIGURATION: Release
DOTNET_CORE_VERSION: 8.0.x
WORKING_DIRECTORY: UKMCAB.Subscriptions
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: '5.x'
- name: Determine Version
uses: gittools/actions/gitversion/execute@v0
with:
useConfigFile: true
configFilePath: ./.github/gitversion.yml
- name: Restore
run: dotnet restore "${{ env.WORKING_DIRECTORY }}"
- name: Build
run: dotnet build "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore
#- name: Test
# run: dotnet test "${{ env.WORKING_DIRECTORY }}" --no-build --verbosity normal
- name: Package nuget
run: dotnet pack "${{ env.WORKING_DIRECTORY }}/UKMCAB.Subscriptions.Core/UKMCAB.Subscriptions.Core.csproj" --configuration ${{ env.CONFIGURATION }} -o:package /p:PackageVersion=$GITVERSION_SEMVER
- name: Push generated package to GitHub registry
run: dotnet nuget push "./package/*.nupkg" --source https://nuget.pkg.github.com/OfficeForProductSafetyAndStandards/index.json --api-key ${{ github.token }}