Skip to content

CI: the Hackage publish builds the docs before it uploads the package - #90

Merged
aoinoikaz merged 1 commit into
mainfrom
ci-hackage-build-before-upload
Nov 5, 2026
Merged

aoinoikaz merged 1 commit into
mainfrom
ci-hackage-build-before-upload

Conversation

@aoinoikaz

Copy link
Copy Markdown
Contributor

publish.yml uploaded the sdist, then built the documentation, then uploaded it. A documentation build that failed left the version on Hackage with no documentation, and a Hackage version cannot be withdrawn; the upload step's duplicate-version skip exists so a re-run can still reach the docs.

The documentation is now built right after the sdist, before either upload, so everything that can fail runs before anything is published, and the two uploads run back to back. The duplicate-version skip stays, for a re-run after a failed documentation upload. Hackage cannot publish a package and its documentation together: publishing a candidate copies only its tarball and .cabal file (publishCandidate in hackage-server's PackageCandidates.hs).

Comments that narrated past releases (0.9.0.0's undated changelog and missing docs, the builder's GHC version at one point in time, an issue number) now say what each step does and why. The haskell/cabal#9577 undo condition for the sublibrary graft stays.

Checks: actionlint clean; ASCII only; the steps' commands are unchanged, only their order and comments.

The package was uploaded before the documentation was built, so a
documentation build that failed left a version on Hackage with no
docs, and a version cannot be withdrawn. Both are now built first, and
the two uploads run back to back. Comments that narrated past releases
now say what each step does and why.
@aoinoikaz
aoinoikaz merged commit 5f59fe6 into main Nov 5, 2026
23 of 24 checks passed
@aoinoikaz
aoinoikaz deleted the ci-hackage-build-before-upload branch November 5, 2026 17: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.

1 participant