Repository navigation
ci: chain NuGet publish directly after release job - #33
Merged
Merged
Conversation
GITHUB_TOKEN-triggered events do not fire other workflows, so the release: published trigger in publish.yml never worked. Fix by adding a publish job in release.yml that runs via needs: release, receiving the version via job outputs. publish.yml keeps push: tags and workflow_dispatch as fallback triggers.
There was a problem hiding this comment.
Pull request overview
This PR updates the release/publish automation so NuGet publishing happens reliably by chaining the publish step directly after the release job (since GITHUB_TOKEN-created releases/tags don’t trigger other workflows).
Changes:
- Exposes the calculated version from
releaseas a job output and passes it to a newpublishjob in the same workflow run. - Adds a
publishjob torelease.ymlthat packs and pushes the NuGet package after the release is created. - Changes
publish.ymlto trigger on tag pushes (and keepsworkflow_dispatchas a fallback).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/release.yml | Adds a downstream publish job that uses the release job’s version output to pack and push to NuGet. |
| .github/workflows/publish.yml | Switches fallback triggering from release: published to push: tags plus workflow_dispatch. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+4
to
+6
| push: | ||
| tags: | ||
| - 'v[0-9]+.[0-9]+.[0-9]+' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GITHUB_TOKEN-triggered events triggar inte andra workflows —release: publishedipublish.ymlhar aldrig fungeratpublish-jobb irelease.ymlmedneeds: releaseså publish körs direkt i samma workflow-körningrelease.outputs.version)publish.ymlbehållerpush: tagsochworkflow_dispatchsom fallbackTest plan
releaseochpublish) körs i samma workflow-körning