Skip to content

ci: make the Octopus publish idempotent - #231

Open
NickJosevski wants to merge 1 commit into
mainfrom
chore/idempotent-octopus-publish
Open

ci: make the Octopus publish idempotent#231
NickJosevski wants to merge 1 commit into
mainfrom
chore/idempotent-octopus-publish

Conversation

@NickJosevski

@NickJosevski NickJosevski commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Publish to Octopus fails whenever a version is published twice:

Metadata for the specified Package ID and version already exists. To proceed anyway, specify an overwriteMode of OverwriteExisting or IgnoreIfExists.

GitVersion derives the PR version from the commit count (e.g. 6.6.1-PullRequest0229.4), so amending a commit or re-running the workflow produces the same version as the previous run, and both publish actions default to FailIfExists. Hit on #229 after a force push.

Sets overwrite_mode: OverwriteExisting on the build-information and package pushes, so a re-publish replaces the previous artefacts rather than failing. OverwriteExisting rather than IgnoreIfExists because the re-published build genuinely differs — keeping the stale package and build information would be worse than replacing them.

@github-actions github-actions Bot added the ci label Aug 14, 2026
@NickJosevski
NickJosevski force-pushed the chore/idempotent-octopus-publish branch from 9c4164d to bf78d0c Compare August 18, 2026 05:31
@NickJosevski
NickJosevski marked this pull request as ready for review August 19, 2026 02:16
Both publish actions default to FailIfExists, so re-publishing a version that
already exists fails the job. GitVersion derives a PR version from the commit
count, so amending a commit or re-running a workflow reuses the version and
the build information push then 409s.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@NickJosevski
NickJosevski force-pushed the chore/idempotent-octopus-publish branch from bf78d0c to a816bdc Compare August 20, 2026 05:32
@NickJosevski
NickJosevski enabled auto-merge (rebase) August 20, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant