Skip to content

Add automated NuGet publish workflow on release #34

Description

@tw4

Summary

There is no automated workflow to publish new versions of BuzzSpire.Nexar to NuGet.org. Releases are presumably done manually, which is error-prone and inconsistent.

Problems

  • No standard release process defined
  • Risk of publishing with incorrect version or missing artifacts
  • No audit trail for who published what and when

Proposed Solution

Add a GitHub Actions workflow that triggers on a new GitHub Release tag and automatically publishes the NuGet package.

on:
  release:
    types: [published]

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-dotnet@v4
        with:
          dotnet-version: 9.x
      - run: dotnet pack --configuration Release
      - run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

Requires adding NUGET_API_KEY as a GitHub Actions secret.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ci/cdContinuous integration and deploymentenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions