-
-
Notifications
You must be signed in to change notification settings - Fork 410
[skip circleci] Update release instructions #2384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
98336a5
b049713
523c355
f5275b9
36eae54
1c5b3c6
ecfcd3c
773daa9
c5197f0
76a9620
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,9 @@ defaults: | |
| on: | ||
| release: | ||
| types: [created] | ||
| push: | ||
| branches: | ||
| - '*-check-build' | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
@@ -30,8 +33,8 @@ jobs: | |
| ghc-version: ${{ matrix.ghc }} | ||
| cabal-version: '3.4' | ||
|
|
||
| - if: ${{ matrix.ghc == '9.0.1' }} | ||
| name: Use modified cabal.project for ghc9 | ||
| - name: Use modified cabal.project for ghc9 | ||
| if: ${{ matrix.ghc == '9.0.1' }} | ||
| run: cp cabal-ghc901.project cabal.project | ||
|
|
||
| - name: Shorten binary names | ||
|
|
@@ -77,13 +80,13 @@ jobs: | |
| echo "package floskell" >> cabal.project | ||
| echo " ghc-options: -O0" >> cabal.project | ||
|
|
||
| - name: Build Server | ||
| - name: Build server | ||
| # Try building it twice in case of flakey builds on Windows | ||
| run: | | ||
| cabal build exe:hls -O2 $LINUX_CABAL_ARGS || \ | ||
| cabal build exe:hls -O2 $LINUX_CABAL_ARGS -j1 | ||
|
|
||
| - name: Compress Server Binary | ||
| - name: Compress server binary | ||
| id: compress_server_binary | ||
| run: | | ||
| HLS_BUILD=$(find dist-newstyle \( -name 'hls' -o -name 'hls.exe' \) -type f) | ||
|
|
@@ -101,7 +104,8 @@ jobs: | |
| echo ::set-output name=extension::gz | ||
| fi | ||
|
|
||
| - name: Upload Server Binary | ||
| - name: Upload server to release | ||
| if: ${{ !contains(github.ref_name, 'check') }} | ||
| uses: actions/[email protected] | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
@@ -111,16 +115,17 @@ jobs: | |
| asset_name: haskell-language-server-${{ runner.OS }}-${{ env.GHC_VERSION }}${{env.EXE_EXT}}.${{ steps.compress_server_binary.outputs.extension }} | ||
| asset_content_type: ${{ steps.compress_server_binary.outputs.content_type }} | ||
|
|
||
| - uses: actions/upload-artifact@v2 | ||
| - name: Upload server to workflow artifacts | ||
| uses: actions/upload-artifact@v2 | ||
| with: | ||
| name: haskell-language-server-${{ runner.OS }}-${{ matrix.ghc }}${{env.EXE_EXT}}.${{ steps.compress_server_binary.outputs.extension }} | ||
| path: ${{ steps.compress_server_binary.outputs.path }} | ||
|
|
||
| - name: Build Wrapper | ||
| - name: Build wrapper | ||
| if: matrix.ghc == '8.10.7' | ||
| run: cabal build exe:hls-wrapper -O2 $LINUX_CABAL_ARGS | ||
|
|
||
| - name: Compress Wrapper Binary | ||
| - name: Compress wrapper binary | ||
| if: matrix.ghc == '8.10.7' | ||
| id: compress_wrapper_binary | ||
| run: | | ||
|
|
@@ -139,8 +144,8 @@ jobs: | |
| echo ::set-output name=extension::gz | ||
| fi | ||
|
|
||
| - name: Upload Wrapper | ||
| if: matrix.ghc == '8.10.7' | ||
| - name: Upload wrapper to the release | ||
| if: ${{ matrix.ghc == '8.10.7' && !contains(github.ref_name, 'check') }} | ||
| uses: actions/[email protected] | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
@@ -150,31 +155,34 @@ jobs: | |
| asset_name: haskell-language-server-wrapper-${{ runner.OS }}${{env.EXE_EXT}}.${{ steps.compress_wrapper_binary.outputs.extension }} | ||
| asset_content_type: ${{ steps.compress_wrapper_binary.outputs.content_type}} | ||
|
|
||
| - uses: actions/upload-artifact@v2 | ||
| - name: Upload wrapper to workflow artifacts | ||
| uses: actions/upload-artifact@v2 | ||
| if: matrix.ghc == '8.10.7' | ||
| with: | ||
| name: haskell-language-server-wrapper-${{ runner.OS }}${{env.EXE_EXT}}.${{ steps.compress_wrapper_binary.outputs.extension }} | ||
| path: ${{ steps.compress_wrapper_binary.outputs.path }} | ||
| # generates a custom tarball with sources, used by `ghcup compile hls` | ||
|
|
||
| # generates a custom tarball with sources, used by `ghcup compile hls` | ||
| src-tar: | ||
| needs: build | ||
| runs-on: ubuntu-18.04 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| submodules: true | ||
| - name: "Create source tarball" | ||
|
|
||
| - name: Create source tarball | ||
| run: | | ||
| mkdir src-dist | ||
| git archive --prefix=haskell-language-server-${{ github.event.release.tag_name }}/ \ | ||
| --format=tar.gz \ | ||
| -o src-dist/haskell-language-server.tar.gz \ | ||
| HEAD | ||
|
|
||
| - uses: actions/[email protected] | ||
|
|
||
| - name: Upload source tarball to the release | ||
| if: ${{ !contains(github.ref_name, 'check') }} | ||
| uses: actions/[email protected] | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
|
|
@@ -183,11 +191,12 @@ jobs: | |
| asset_name: haskell-language-server-${{ github.event.release.tag_name }}-src.tar.gz | ||
| asset_content_type: application/gzip | ||
|
|
||
| - uses: actions/upload-artifact@v2 | ||
| - name: Upload source tarball to workflow artifacts | ||
| uses: actions/upload-artifact@v2 | ||
| with: | ||
| name: haskell-language-server-${{ github.event.release.tag_name }}-src.tar.gz | ||
| path: src-dist/haskell-language-server.tar.gz | ||
|
|
||
| # this generates .gz tarfiles containing binaries for all GHC versions and OS's | ||
| # used by `ghcup install hls` | ||
| tar: | ||
|
|
@@ -199,7 +208,8 @@ jobs: | |
| steps: | ||
| - uses: actions/download-artifact@v2 | ||
|
|
||
| - run: | | ||
| - name: Generate tarball with all binaries | ||
| run: | | ||
| # move the binaries for the specific platform into bin/ | ||
| mkdir bin | ||
| mv haskell-language-server-${{ matrix.os }}-*/* bin | ||
|
|
@@ -214,7 +224,9 @@ jobs: | |
| fi | ||
| tar -czpf haskell-language-server.tar.gz * | ||
|
|
||
| - uses: actions/[email protected] | ||
| - name: Upload binaries tarball to the release | ||
| if: ${{ !contains(github.ref_name, 'check') }} | ||
| uses: actions/[email protected] | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
|
|
@@ -223,7 +235,8 @@ jobs: | |
| asset_name: haskell-language-server-${{ matrix.os }}-${{ github.event.release.tag_name }}.tar.gz | ||
| asset_content_type: application/gzip | ||
|
|
||
| - uses: actions/upload-artifact@v2 | ||
| - name: Upload binaries tarball to workflow artifacts | ||
| uses: actions/upload-artifact@v2 | ||
| with: | ||
| name: haskell-language-server-${{ matrix.os }}-${{ github.event.release.tag_name }}.tar.gz | ||
| path: bin/haskell-language-server.tar.gz | ||
|
|
@@ -234,13 +247,15 @@ jobs: | |
| steps: | ||
| - uses: actions/download-artifact@v2 | ||
|
|
||
| - run: | | ||
| # generate sha256 sums for all current artifacts | ||
| - name: Generate sha256 sums for all workflow artifacts | ||
| run: | | ||
| sha256sum --tag haskell-language-server*/* >> SHA256SUMS | ||
| # we clean up tags to match the release file names | ||
| sed -i 's/\/.*)/)/g' SHA256SUMS | ||
|
|
||
| - uses: actions/[email protected] | ||
| - name: Upload sha256sums to the release | ||
| if: ${{ !contains(github.ref_name, 'check') }} | ||
| uses: actions/[email protected] | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
|
|
@@ -249,7 +264,8 @@ jobs: | |
| asset_name: SHA256SUMS | ||
| asset_content_type: plain/text | ||
|
|
||
| - uses: actions/upload-artifact@v2 | ||
| - name: Upload sha256sums to workflow artifacts | ||
| uses: actions/upload-artifact@v2 | ||
| with: | ||
| name: SHA256SUMS | ||
| path: SHA256SUMS | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,23 +16,38 @@ and it is being used in nix environments. | |
|
|
||
| ## Minimal checklist | ||
|
|
||
| ### prerelease sanity checks | ||
|
|
||
| - [ ] create a branch named `${version}-check-hackage`: it will trigger the hackage workflow *without* uploading the packages | ||
| - [ ] trigger the build workflow pushing a branch named `${version}-check-build` | ||
| - [ ] create a prerelease tag `${version}-check-gitlab` and push it to the [project repo in gitlab](https://gitlab.haskell.org/haskell/haskell-language-server) to check the build is fine | ||
| ### github release | ||
|
|
||
| * [ ] 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. | ||
| - [ ] 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. | ||
| Nix users should run command `gen-hls-changelogs` (a wrapper of the script) in nix-shell instead. | ||
| * [ ] add that list to the actual [Changelog](https://github.com/haskell/haskell-language-server/blob/master/ChangeLog.md) with a description of the release. | ||
| * [ ] bump up versions of changed packages. All are optional but [haskell-language-server itself](https://github.com/haskell/haskell-language-server/blob/master/haskell-language-server.cabal). | ||
| * [ ] create the tag and make an initial prerelease to trigger the ci workflow (see details below) | ||
| * [ ] contact ghcup team (#haskell-ghcup irc channel or via its [repo](https://gitlab.haskell.org/haskell/ghcup-hs/-/issues)) to try to sync our release and its inclusion in ghcup | ||
| * [ ] check uploaded binaries (see windows note below) and the release description (usually the changelog entry) and uncheck the prerelease box | ||
| * [ ] 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:) | ||
|
|
||
| - [ ] add that list to the actual [Changelog](https://github.com/haskell/haskell-language-server/blob/master/ChangeLog.md) with a description of the release. | ||
| - [ ] bump up versions of changed packages. All are optional but [haskell-language-server itself](https://github.com/haskell/haskell-language-server/blob/master/haskell-language-server.cabal). | ||
| - [ ] create the tag and make an initial prerelease to trigger the ci workflow (see details below) | ||
| - [ ] contact ghcup team (#haskell-ghcup irc channel or via its [repo](https://gitlab.haskell.org/haskell/ghcup-hs/-/issues)) to try to sync our release and its inclusion in ghcup | ||
| - [ ] check uploaded binaries (see windows note below) and the release description (usually the changelog entry) and uncheck the prerelease box | ||
jneira marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - [ ] make public the release in the usual social channels (not required but useful to spread the word :slightly_smiling_face:): | ||
| - [ ] irc | ||
| - [ ] matrix | ||
| - [ ] discord | ||
| - [ ] discourse | ||
| ### hackage release | ||
|
|
||
| * [ ] bump up package versions following the [pvp specification](https://pvp.haskell.org/) if they are not already updated | ||
| * [ ] create ${version}-hackage branch to trigger the hackage github workflow which will upload all changed packages to hackage as candidates | ||
| * [ ] check manually candidates in hackage | ||
| * [ ] publish them definitely | ||
| - [ ] bump up package versions following the [pvp specification](https://pvp.haskell.org/) if they are not already updated. You could use [policeman](https://github.com/kowainik/policeman) to help with this step. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how is this different to the previous verison-bumping step on line 29? should there just be one version-bumping step done before any releasing?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The difference is in the |
||
| - [ ] create ${version}-hackage branch to trigger the hackage github workflow which will upload all changed packages to hackage as candidates | ||
| - [ ] check manually candidates in hackage | ||
| - [ ] publish them definitely | ||
|
|
||
| ### ghcup release | ||
|
|
||
| * [ ] push the release tag to the [haskell-language-server gitlab repo](https://gitlab.haskell.org/haskell/haskell-language-server) to trigger the build of ghcup specific artifacts | ||
| * [ ] change ghcup metadata to include the new release in https://github.com/haskell/ghcup-metadata | ||
|
|
||
| ## Making a new release of haskell-language-server in github | ||
|
|
||
|
|
@@ -140,11 +155,20 @@ To manually upload a new binary we should: | |
| We aim to do hackage releases following the github ones described above. | ||
| To help in that job we have added a [github workflow](https://github.com/haskell/haskell-language-server/blob/master/.github/workflows/hackage.yml) | ||
|
|
||
| That script checks, generates the tar.gz files, unpacks and builds them in isolation against hackage head | ||
| if the package version in the branch is different from hackage. | ||
| If the package in the branch has the same version as the released one, | ||
| it will check the relevant files have not changed and will throw an error | ||
| otherwise. | ||
| That script checks, generates the tar.gz files, unpacks and builds them in isolation | ||
| against hackage head if the package version in the branch is different from hackage. | ||
| If the package in the branch has the same version as the released one, it will check | ||
| the relevant files have not changed and will throw an error otherwise. | ||
|
|
||
| You can trigger a build only doing the above step pushing a branch named `*-check-hackage`. | ||
jneira marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The script will upload the tarballs as candidates, maintainers will have to check and publish them definitely. | ||
|
|
||
| ## haskell gitlab release pipeline | ||
|
|
||
| The script will upload the tarballs as candidates, maintainers will have | ||
| to check and publish them definitely. | ||
| The project is present in the haskell gitlab server: https://gitlab.haskell.org/haskell/haskell-language-server | ||
| The main motivation is leverage the ci infrastructure which includes architectures not included in the github ci. | ||
jneira marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| The specific architectures only available through gitlab are: `armv7-linux`, `x86_64-freebsd`, `aarch64-darwin`, `aarch64-linux` | ||
| The gitlab pipeline uses the configuration file [.gitlab-ci.yml](https://github.com/haskell/haskell-language-server/blob/master/.gitlab-ci.yml) | ||
| and the sh/nix scripts in [.gitlab](https://github.com/haskell/haskell-language-server/tree/master/.gitlab) | ||
| It is triggered by pushing a tag to the gitlab repo. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which uploaded binaries? where are they? I guess they were generated somewhere based on the previous workflows?