Skip to content

Add action step to push package to Octopus feed#3

Closed
eddymoulton wants to merge 3 commits intooctopus/masterfrom
em/add-action-step-to-push-package-to-octop
Closed

Add action step to push package to Octopus feed#3
eddymoulton wants to merge 3 commits intooctopus/masterfrom
em/add-action-step-to-push-package-to-octop

Conversation

@eddymoulton
Copy link
Copy Markdown
Collaborator

@eddymoulton eddymoulton commented Mar 18, 2026

This is going to need #1 to be merged before it does anything useful.

Relates to MD-1600

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a release/publishing step to the CI pipeline so the built NuGet package can be pushed to an Octopus feed, and documents how to trigger releases in this fork.

Changes:

  • Documented the tag-based release process for the Octopus fork in README.md.
  • Updated CI packaging job to push the generated .nupkg to a configured NuGet feed.
  • Refreshed the MinVer example tag/version shown in the README.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
README.md Updates MinVer sample output and adds “Releasing this Octopus fork” tag-based release instructions.
.github/workflows/ci.yml Adds a dotnet nuget push step after packaging to publish the produced NuGet package to a feed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +95 to +101
- name: Push package to feed 🐙
id: push-feed
shell: bash
env:
FEED_API_KEY: ${{ secrets.FEED_API_KEY }}
FEED_SOURCE: ${{ secrets.FEED_SOURCE }}
run: dotnet nuget push ./nuget.package/*.nupkg --api-key "$FEED_API_KEY" --source "$FEED_SOURCE"
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The push-to-feed step currently runs for branch pushes and pull_request runs as well, which can (a) unintentionally publish packages from non-release builds and (b) fail PR builds because secrets are not provided to workflows from forks. Gate this step (or the whole package job) so it only runs on tag pushes (e.g., github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')), and optionally restrict to the canonical repo/owner.

Copilot uses AI. Check for mistakes.
env:
FEED_API_KEY: ${{ secrets.FEED_API_KEY }}
FEED_SOURCE: ${{ secrets.FEED_SOURCE }}
run: dotnet nuget push ./nuget.package/*.nupkg --api-key "$FEED_API_KEY" --source "$FEED_SOURCE"
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dotnet nuget push without --skip-duplicate makes the workflow non-idempotent: rerunning a successful tag build (or rebuilding an existing tag) will typically fail with a conflict when the version already exists in the feed. Consider adding --skip-duplicate (and/or pushing only the intended package type) so release reruns don't fail unnecessarily.

Suggested change
run: dotnet nuget push ./nuget.package/*.nupkg --api-key "$FEED_API_KEY" --source "$FEED_SOURCE"
run: dotnet nuget push ./nuget.package/*.nupkg --api-key "$FEED_API_KEY" --source "$FEED_SOURCE" --skip-duplicate

Copilot uses AI. Check for mistakes.
name: NuGet package
path: ./nuget.package/*.nupkg
- name: Push package to feed 🐙
id: push-feed
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The id: push-feed step id isn't referenced anywhere in this workflow. If you don't consume outputs from this step later, drop the id to reduce noise.

Suggested change
id: push-feed

Copilot uses AI. Check for mistakes.
Comment on lines 90 to 91
MinVer: Calculated version 2.0.313-alpha.0.3.
2.0.313-alpha.0.3
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MinVer output example is internally inconsistent: it shows Tag: '2.0.323' but then Calculated version 2.0.313-alpha.0.3 / 2.0.313-alpha.0.3 (lower than the tag). Update the example so the calculated version matches the shown tag (or adjust the tag/version pair together).

Suggested change
MinVer: Calculated version 2.0.313-alpha.0.3.
2.0.313-alpha.0.3
MinVer: Calculated version 2.0.324-alpha.0.3.
2.0.324-alpha.0.3

Copilot uses AI. Check for mistakes.
@eddymoulton
Copy link
Copy Markdown
Collaborator Author

Replaced by #7

@eddymoulton eddymoulton closed this Apr 9, 2026
@eddymoulton eddymoulton deleted the em/add-action-step-to-push-package-to-octop branch April 9, 2026 06:03
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.

2 participants