Skip to content

Add release.yml workflow; factor publish out of ci.yml#2

Merged
StuartMeeks merged 1 commit intomainfrom
add-release-workflow
May 3, 2026
Merged

Add release.yml workflow; factor publish out of ci.yml#2
StuartMeeks merged 1 commit intomainfrom
add-release-workflow

Conversation

@StuartMeeks
Copy link
Copy Markdown
Owner

Summary

  • New .github/workflows/release.yml — triggers on v* tag push. Self-contained: restore → build → test → pack → upload-artifact → push to nuget.org with --skip-duplicate. Does not depend on a separate CI run completing first.
  • Trimmed .github/workflows/ci.yml — drops the tags trigger and the publish job. CI now runs on push-to-main and PRs only; release.yml owns the tag flow end-to-end.

This matches the layout you asked for. Aligned with the Auth repo's logic for gating publication on refs/tags/v*, just split into its own file for clarity.

Required setup before tagging

The repo needs a NUGET_API_KEY secret. Add it via Settings → Secrets and variables → Actions → New repository secret.

Test plan

  • PR's CI workflow runs (build + test) and is green
  • After merge, push a v0.1.x tag and confirm release.yml fires, builds the package, and pushes to nuget.org

Tag/publish flow after merge

git checkout main && git pull
git tag v0.1.1 -a -m "v0.1.1"
git push origin v0.1.1

🤖 Generated with Claude Code

Tag-driven publish to nuget.org now lives in its own workflow file
(matches the layout the user asked for; aligned with how the Auth
repo gates publishing on `refs/tags/v*`).

- .github/workflows/release.yml — triggers on `v*` tag push. Restore →
  build → test → pack → upload-artifact → nuget push --skip-duplicate.
  Self-contained: doesn't depend on a CI workflow run completing first.
- .github/workflows/ci.yml — drops the `tags` trigger and the publish
  job. CI now runs only on push-to-main and PRs; release.yml owns the
  tag flow end-to-end.

Repo needs a NUGET_API_KEY secret for the push to succeed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@StuartMeeks StuartMeeks merged commit 7670b6d into main May 3, 2026
4 checks passed
@StuartMeeks StuartMeeks deleted the add-release-workflow branch May 3, 2026 11:14
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.

1 participant