-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hackage can't build X11 because it doesn't install the required libraries and headers (Xinerama, Xrandr, …). Therefore we need to upload the docs ourselves. I decided to piggyback on the haskell-ci workflow instead of having a separate workflow as building the docs is not as trivial as the sdist. Additionally, the sdist and haddock tarball are published as artifacts so that people can download snapshots and we could possibly use that for the xmonad website as well.
- Loading branch information
Showing
5 changed files
with
102 additions
and
34 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- .github/workflows/haskell-ci.yml.orig | ||
+++ .github/workflows/haskell-ci.yml | ||
@@ -14,8 +14,11 @@ | ||
# | ||
name: Haskell-CI | ||
on: | ||
- - push | ||
- - pull_request | ||
+ push: | ||
+ pull_request: | ||
+ release: | ||
+ types: | ||
+ - published | ||
jobs: | ||
linux: | ||
name: Haskell-CI - Linux - ${{ matrix.compiler }} | ||
@@ -28,6 +31,7 @@ jobs: | ||
include: | ||
- compiler: ghc-9.0.1 | ||
allow-failure: false | ||
+ upload: true | ||
- compiler: ghc-8.10.4 | ||
allow-failure: false | ||
- compiler: ghc-8.8.4 | ||
@@ -171,8 +175,37 @@ jobs: | ||
${CABAL} -vnormal check | ||
- name: haddock | ||
run: | | ||
- $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all | ||
+ $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH --haddock-for-hackage --builddir $GITHUB_WORKSPACE/haddock all | ||
- name: unconstrained build | ||
run: | | ||
rm -f cabal.project.local | ||
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all | ||
+ - name: upload artifacts (sdist) | ||
+ if: matrix.upload | ||
+ uses: actions/upload-artifact@v2 | ||
+ with: | ||
+ path: ${{ github.workspace }}/sdist/*.tar.gz | ||
+ - name: upload artifacts (haddock) | ||
+ if: matrix.upload | ||
+ uses: actions/upload-artifact@v2 | ||
+ with: | ||
+ path: ${{ github.workspace }}/haddock/*-docs.tar.gz | ||
+ - name: hackage upload | ||
+ if: matrix.upload && github.event_name == 'release' | ||
+ run: | | ||
+ set -ex | ||
+ curl \ | ||
+ --silent --show-error --fail \ | ||
+ --header "Accept: text/plain" \ | ||
+ --header "Authorization: X-ApiKey ${{ secrets.HACKAGE_API_KEY }}" \ | ||
+ --form package=@$GITHUB_WORKSPACE/sdist/${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.tar.gz \ | ||
+ https://hackage.haskell.org/packages/candidates/ | ||
+ curl \ | ||
+ --silent --show-error --fail \ | ||
+ -X PUT \ | ||
+ --header "Accept: text/plain" \ | ||
+ --header "Authorization: X-ApiKey ${{ secrets.HACKAGE_API_KEY }}" \ | ||
+ --header "Content-Type: application/x-tar" \ | ||
+ --header "Content-Encoding: gzip" \ | ||
+ --data-binary @$GITHUB_WORKSPACE/haddock/${{ github.event.repository.name }}-${{ github.event.release.tag_name }}-docs.tar.gz \ | ||
+ https://hackage.haskell.org/package/${{ github.event.repository.name }}-${{ github.event.release.tag_name }}/candidate/docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters