Skip to content

fix(ci): publish dotnet packages only from final release tags - #8311

Merged
Xuanwo merged 2 commits into
apache:mainfrom
Fatorin:fix-dotnet-release-suffix
Sep 15, 2026
Merged

Xuanwo merged 2 commits into
apache:mainfrom
Fatorin:fix-dotnet-release-suffix

Conversation

@Fatorin

@Fatorin Fatorin commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #8310.

Rationale for this change

The "Determine version suffix" step in release_dotnet.yml recognises final and rc release tags only when the run is a push event.

The release automation now pushes final tags with GITHUB_TOKEN and dispatches the workflow on the tag, so the run arrives as workflow_dispatch, falls through to the manual release_type branch, and packs preview.<run_number>.

For v0.59.2 this published Apache.OpenDAL 0.2.2-preview.78 instead of 0.2.2, and every later automated release would do the same.

The release_type input that produced preview and rc packages predates the automation and is the only path in the repository that pushes an unvoted build to a public registry, so this PR removes it together with the fix.

What changes are included in this PR?

  • release_dotnet.yml: the ref alone decides the suffix. An -rc.N tag packs rc.N, a final tag packs the version from OpenDAL.csproj with no suffix, and any other ref packs preview.<run_number>. The publish job runs only for final tags; every other build stays a workflow artifact.
  • release_dotnet.yml: remove the release_type dispatch input and the manual prerelease publishing path.
  • scripts/release_lifecycle.py, weekly_release.yml, website/community/release/weekly.md: stop passing release_type=none when dispatching the .NET workflow.

Verified by running the suffix step's script locally for push, workflow_dispatch, and pull_request against final tags, rc tags, main, and a merge ref; only non-tag refs produce preview.N. scripts/test_release_lifecycle.py passes except test_real_git_signed_final_refs, which fails on Windows before this change because it hard-codes /tmp.

Are there any user-facing changes?

No change for package consumers. Release managers can no longer publish a preview or rc NuGet package by manual dispatch; a dispatch on a non-tag ref only produces a workflow artifact. Older rc tags still declare the input with default: none, so dispatching them without the argument keeps working.

Breaking changes

AI Usage Statement

  • Harness: Claude Code (desktop app)
  • Model: Claude Fable 5.1 (claude-fable-5-1)
  • Effort: high
  • Role: Traced the v0.59.2 workflow run and the release lifecycle script to locate the cause, drafted the changes and this description, and simulated the suffix step locally; the author decided to remove the manual prerelease path and reviewed the diagnosis and the changes. Assumption affecting review: GitHub applies an input's default when a dispatch omits it, so old tags whose workflow still declares release_type accept the argument-less dispatch. actionlint is not installed locally, so the workflows rely on the CI lint.

@Fatorin Fatorin changed the title Fix dotnet release suffix fix(ci): publish dotnet packages only from final release tags Sep 15, 2026
@Xuanwo
Xuanwo merged commit 2698e90 into apache:main Sep 15, 2026
46 of 47 checks passed
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.

bug: release_dotnet.yml publishes a preview version when dispatched on a final tag

2 participants