Skip to content

Workflow file for this run

name: Pack and publish NuGet packages
on:
release:
types:
- published
jobs:
release-nuget:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Install deps
run: |
cd src/DsbNorge.A3Forms
dotnet restore
- name: Build A3Forms
run: |
cd src/DsbNorge.A3Forms
dotnet build --configuration Release --no-restore -p:Deterministic=true -p:BuildNumber=${{ github.run_number }}
- name: Create NuGet package
run: |
cd src/DsbNorge.A3Forms
dotnet pack DsbNorge.A3Forms.csproj --configuration Release --no-restore --no-build -p:BuildNumber=${{ github.run_number }} -p:Deterministic=true
- name: Publish to NuGet Gallery
run: |
cd src/DsbNorge.A3Forms
dotnet nuget push bin/Release/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}