-
Notifications
You must be signed in to change notification settings - Fork 2
Fix preview label not creating pre-release NuGet packages #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@copilot looking at your comments, I would recommend reviewing the comment in the linked PR. The |
Co-authored-by: matt-goldman <[email protected]>
You're right that I should focus specifically on the The original line Could you clarify how the
You're absolutely right! After digging deeper, I found that the From their docs: "If triggered on your repo's default branch, the bump version will be a release tag." The fix (commit cbae01b) now:
This way the "preview" label will finally create actual pre-release packages instead of production releases. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
The root cause was that anothrNick/github-tag-action ignores the PRERELEASE environment variable when running on the default branch (main), always creating production releases instead of preview releases. This fix: - Conditionally uses the existing action only for release labels - Manually creates preview tags with -preview suffix when preview label is present - Maintains existing norelease functionality - Properly sets all environment variables and outputs Co-authored-by: matt-goldman <[email protected]>
|
@copilot no actually I'm the one who's confused. I just checked the one PR that actually had the |
You're absolutely right - I see now that the original The fix I implemented (cbae01b) addresses this core issue by bypassing the
The workflow should now correctly handle preview releases that were being incorrectly published as production releases. |
matt-goldman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The GitHub Actions workflow had a bug that prevented PRs with the "preview" label from creating pre-release NuGet packages. Instead of publishing packages with a
-previewsuffix, they were being published as production releases.Root Cause
The issue was that the
anothrNick/github-tag-actionautomatically overrides thePRERELEASEenvironment variable when running on the default branch (main). From their documentation:This meant that even when
PRERELEASE=truewas set, the action would ignore it and create production releases because the workflow runs on the main branch after PR merges.Fix
The solution bypasses the GitHub Tag Bump action for preview releases and manually creates the preview tags:
anothrNick/github-tag-actiononly whenPRERELEASE=false(release labels)PRERELEASE=true, manually calculates the next version and creates a tag with-previewsuffixBehavior After Fix
-previewsuffix → Pre-release NuGet packages published ✅The workflow now correctly creates pre-release packages when the "preview" label is present, addressing the original issue where preview releases were incorrectly published as production releases.
Fixes #44.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.