|
| 1 | +--- .github/workflows/haskell-ci.yml.orig |
| 2 | ++++ .github/workflows/haskell-ci.yml |
| 3 | +@@ -14,8 +14,11 @@ |
| 4 | + # |
| 5 | + name: Haskell-CI |
| 6 | + on: |
| 7 | +- - push |
| 8 | +- - pull_request |
| 9 | ++ push: |
| 10 | ++ pull_request: |
| 11 | ++ release: |
| 12 | ++ types: |
| 13 | ++ - published |
| 14 | + jobs: |
| 15 | + linux: |
| 16 | + name: Haskell-CI - Linux - ${{ matrix.compiler }} |
| 17 | +@@ -28,6 +31,7 @@ jobs: |
| 18 | + include: |
| 19 | + - compiler: ghc-9.0.1 |
| 20 | + allow-failure: false |
| 21 | ++ upload: true |
| 22 | + - compiler: ghc-8.10.4 |
| 23 | + allow-failure: false |
| 24 | + - compiler: ghc-8.8.4 |
| 25 | +@@ -171,8 +175,37 @@ jobs: |
| 26 | + ${CABAL} -vnormal check |
| 27 | + - name: haddock |
| 28 | + run: | |
| 29 | +- $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all |
| 30 | ++ $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH --haddock-for-hackage --builddir $GITHUB_WORKSPACE/haddock all |
| 31 | + - name: unconstrained build |
| 32 | + run: | |
| 33 | + rm -f cabal.project.local |
| 34 | + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all |
| 35 | ++ - name: upload artifacts (sdist) |
| 36 | ++ if: matrix.upload |
| 37 | ++ uses: actions/upload-artifact@v2 |
| 38 | ++ with: |
| 39 | ++ path: ${{ github.workspace }}/sdist/*.tar.gz |
| 40 | ++ - name: upload artifacts (haddock) |
| 41 | ++ if: matrix.upload |
| 42 | ++ uses: actions/upload-artifact@v2 |
| 43 | ++ with: |
| 44 | ++ path: ${{ github.workspace }}/haddock/*-docs.tar.gz |
| 45 | ++ - name: hackage upload |
| 46 | ++ if: matrix.upload && github.event_name == 'release' |
| 47 | ++ run: | |
| 48 | ++ set -ex |
| 49 | ++ curl \ |
| 50 | ++ --silent --show-error --fail \ |
| 51 | ++ --header "Accept: text/plain" \ |
| 52 | ++ --header "Authorization: X-ApiKey ${{ secrets.HACKAGE_API_KEY }}" \ |
| 53 | ++ --form package=@$GITHUB_WORKSPACE/sdist/${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.tar.gz \ |
| 54 | ++ https://hackage.haskell.org/packages/candidates/ |
| 55 | ++ curl \ |
| 56 | ++ --silent --show-error --fail \ |
| 57 | ++ -X PUT \ |
| 58 | ++ --header "Accept: text/plain" \ |
| 59 | ++ --header "Authorization: X-ApiKey ${{ secrets.HACKAGE_API_KEY }}" \ |
| 60 | ++ --header "Content-Type: application/x-tar" \ |
| 61 | ++ --header "Content-Encoding: gzip" \ |
| 62 | ++ --data-binary @$GITHUB_WORKSPACE/haddock/${{ github.event.repository.name }}-${{ github.event.release.tag_name }}-docs.tar.gz \ |
| 63 | ++ https://hackage.haskell.org/package/${{ github.event.repository.name }}-${{ github.event.release.tag_name }}/candidate/docs |
0 commit comments