Skip to content

publish

publish #1

Workflow file for this run

name: publish
# Publishes the Bobcat NuGet packages. The version is centralized in
# src/Directory.Build.props (<Version>); bump it there to cut a release.
# Trigger by pushing a tag like `v0.5.0`, or run manually from the Actions tab.
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Test
run: dotnet test --no-build -c Release --verbosity normal
- name: Pack
run: dotnet pack --no-build -c Release -o ${{ github.workspace }}/artifacts
- name: Push to NuGet
run: >
dotnet nuget push "${{ github.workspace }}/artifacts/*.nupkg"
--source https://api.nuget.org/v3/index.json
--api-key ${{ secrets.NUGET_API_KEY }}
--skip-duplicate