Skip to content

feat(ci): Add automated Chocolatey publishing to release workflow#45

Merged
rianjs merged 1 commit intomainfrom
feat/chocolatey-workflow
Jan 17, 2026
Merged

feat(ci): Add automated Chocolatey publishing to release workflow#45
rianjs merged 1 commit intomainfrom
feat/chocolatey-workflow

Conversation

@rianjs
Copy link
Copy Markdown
Collaborator

@rianjs rianjs commented Jan 17, 2026

Summary

Add automated Chocolatey publishing to the release workflow, plus a manual retry workflow.

Changes

.github/workflows/release.yml

Added chocolatey job that:

  1. Waits for goreleaser job to complete
  2. Downloads checksums.txt from the release
  3. Extracts Windows amd64 and arm64 hashes
  4. Updates version in packaging/chocolatey/newrelic-cli.nuspec
  5. Injects checksums into packaging/chocolatey/tools/chocolateyInstall.ps1
  6. Runs choco pack to create the nupkg
  7. Runs choco push to publish to Chocolatey

.github/workflows/chocolatey-publish.yml (New)

Manual workflow for retrying failed publishes:

  • Takes version input (e.g., 1.0.14)
  • Validates the release exists
  • Performs the same checksum injection and publish steps

Required Secrets

Secret How to Obtain
CHOCOLATEY_API_KEY https://community.chocolatey.org/account

Workflow Diagram

Tag Push → GoReleaser → Chocolatey Job
                           ↓
                     Download checksums.txt
                           ↓
                     Extract x64/arm64 hashes
                           ↓
                     Update nuspec version
                           ↓
                     Inject checksums into install script
                           ↓
                     choco pack → choco push

Notes

  • Chocolatey job runs on windows-latest (Chocolatey CLI pre-installed)
  • First submission may take 1-3 days for human moderation review
  • Subsequent versions are usually auto-approved within hours once trusted

Closes #37

Add Chocolatey publishing automation:

- Add `chocolatey` job to release.yml that runs after goreleaser:
  - Downloads checksums.txt from release
  - Extracts Windows amd64/arm64 hashes
  - Updates version in nuspec
  - Injects checksums into install script
  - Runs choco pack and push

- Create chocolatey-publish.yml for manual publishing:
  - workflow_dispatch with version input
  - Validates release exists before publishing
  - Useful for retrying failed publishes

Requires CHOCOLATEY_API_KEY secret from chocolatey.org account.
@rianjs rianjs merged commit daff07d into main Jan 17, 2026
2 checks passed
@rianjs rianjs deleted the feat/chocolatey-workflow branch January 17, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ci): Add automated Chocolatey publishing to release workflow

1 participant