Skip to content

Commit 3f49f83

Browse files
committed
Add hackage release instructions
1 parent 384902c commit 3f49f83

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

docs/contributing/releases.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,16 @@ extension](https://github.com/alanz/vscode-hie-server) to provide automatic
88
installation for users on VS Code, but they can also be installed manually
99
when added to the path.
1010

11+
Starting with 0.8.0.0 haskell-language-server and all its related packages
12+
(core libraries like ghcide, plugins and hls itself) is being released in
13+
[hackage](https://hackage.haskell.org/package/haskell-language-server) as well.
14+
This allow cabal users to install it with `cabal install haskell-language-server`
15+
and it is being used in nix environments.
16+
1117
## Minimal checklist
1218

19+
### github release
20+
1321
* [ ] generate the list of pull requests finished since the last release using the [haskell script](https://github.com/haskell/haskell-language-server/blob/master/GenChangelogs.hs) in the project root.
1422
Nix users should run command `gen-hls-changelogs` (a wrapper of the script) in nix-shell instead.
1523
* [ ] add that list to the actual [Changelog](https://github.com/haskell/haskell-language-server/blob/master/ChangeLog.md) with a description of the release.
@@ -19,7 +27,13 @@ when added to the path.
1927
* [ ] check uploaded binaries (see windows note below) and the release description (usually the changelog entry) and uncheck the prerelease box
2028
* [ ] make public the release in the usual social channels: irc, twitter, reddit, discord, discourse, mailing lists, etc (not required but useful to spread the word :slightly_smiling_face:)
2129

22-
## Making a new release of haskell-language-server
30+
### hackage release
31+
32+
* [ ] bump up package versions following the [pvp specification](https://pvp.haskell.org/) if they are not already updated
33+
* [ ] create ${version}-hackage branch to trigger the hackage github workflow which will upload all changed packages to hackage as candidates
34+
* [ ] check manually candidates in hackage
35+
* [ ] publish them definitely
36+
## Making a new release of haskell-language-server in github
2337

2438
Go to the [GitHub releases
2539
page](https://github.com/haskell/haskell-language-server/releases) for
@@ -43,7 +57,7 @@ most recent GHC version.
4357

4458
### ghcup
4559
It also creates a `haskell-language-server-${os}-${hlsVersion}.tar.gz` tarball with
46-
the binaries for *all* supported ghc versions, to help downstream publishers in
60+
the binaries for *all* supported ghc versions, to help downstream publishers in
4761
the distribution of the release. The most prominent publisher using them is `ghcup`.
4862
The `tar` job in the workflow file automates the creation of this.
4963

@@ -100,15 +114,15 @@ and add it to the existing release.
100114

101115
### Updating release artifacts
102116

103-
*IMPORTANT: release artifacts must not be modified, cause it would break
117+
*IMPORTANT: release artifacts must not be modified, cause it would break
104118
its secure distribution using their hashes. We should only add new ones.*
105119

106120
To manually upload a new binary we should:
107121

108122
- Add the new tar/zip following the name conventions of existing ones
109123
- `haskell-language-server-${os}-${ghcVersion}.gz` for `Linux` and `macOS` and `haskell-language-server-Windows-${ghcVersion}.exe.zip` for `Windows`
110124
- the binary inside the gz file is named `haskell-language-server-${ghcVersion}` (with the `.exe` extension for `Windows`). Note that the binary name does not contain the `${os}` part.
111-
- Add the executable to the existing tar `haskell-language-server-${os}-${ghcVersion}.tar.gz` *locally* and upload it under a new name `haskell-language-server-${os}-${ghcVersion}-rev${n}.tar.gz` following the same schema for the binary as the previous one.
125+
- Add the executable to the existing tar `haskell-language-server-${os}-${ghcVersion}.tar.gz` *locally* and upload it under a new name `haskell-language-server-${os}-${ghcVersion}-rev${n}.tar.gz` following the same schema for the binary as the previous one.
112126
- `-rev${n}` is the next revision number of the tarball, starting at 1.
113127
- we should contact users of the tarball (particularly ghcup) to notify the change
114128

@@ -118,3 +132,15 @@ is not included by default in the GitHub Actions build matrix. Instead
118132
they need to be built and uploaded manually. See [this
119133
PR](https://github.com/haskell/haskell-language-server/issues/276) for
120134
more details
135+
136+
## Hackage release workflow
137+
138+
We aim to do hackage releases following the github ones described above.
139+
To help in that job we have added a [github workflow](https://github.com/haskell/haskell-language-server/blob/master/.github/workflows/hackage.yml)
140+
That script check, generates the tar.gz files, unpack thems and build them in isolation against hackage head
141+
if the package version in the branch is different from hackage.
142+
If the package in the branch has the same version as the released one,
143+
it will check the relevant files have not changed and will thorw an error
144+
in other case.
145+
The script will upload the tarballs as candidates, maintainers will have
146+
to check them and publish them definitely.

0 commit comments

Comments
 (0)