git.iko.soy/typeable/libphonenumber
on main help sign in
Upload candidate to Hackage when releasing
commite7e6ffb49ab418256d1c3a0e7c952cc4dceb919e authormniip <mniip@mniip.com> dateTue 21 Mar 2023, 15:17 (4 years ago) parent50f985d
1 file changed+13−2
.github/workflows/ci.yaml+13−2
.github/workflows/ci.yaml+13−2
@@ -34,7 +34,7 @@ jobs:
3434 with:
3535 ghc-version: ${{ matrix.ghc_version }}
3636 cabal-version: "3.10.1.0"
37− - name: install C++ library
37+ - name: Install C++ library
3838 run: |
3939 sudo apt-get update
4040 sudo apt-get install -y libphonenumber-dev
@@ -48,7 +48,7 @@ jobs:
4848 echo "PKGDIR_libphonenumber=$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/libphonenumber-[0-9.]*')" >> "$GITHUB_ENV"
4949 - name: cabal configure
5050 run: cd "$PKGDIR_libphonenumber" && cabal configure --with-ghc=ghc-${{ matrix.ghc_version }}
51− - name: install dependencies
51+ - name: Install dependencies
5252 run: cd "$PKGDIR_libphonenumber" && cabal build --dependencies-only --enable-tests --haddock-all
5353 - name: cabal build
5454 run: cd "$PKGDIR_libphonenumber" && cabal build --ghc-options=-Werror
@@ -69,10 +69,18 @@ jobs:
6969 - uses: haskell/actions/setup@v2
7070 with:
7171 cabal-version: "3.10.1.0"
72+ - name: Install C++ library
73+ run: |
74+ sudo apt-get update
75+ sudo apt-get install -y libphonenumber-dev
7276 - name: cabal sdist
7377 run: |
7478 cabal sdist --output-dir "$GITHUB_WORKSPACE/sdist"
7579 echo "dist=$(find "$GITHUB_WORKSPACE/sdist" -maxdepth 1 -type f -name '*.tar.gz')" >> "$GITHUB_ENV"
80+ - name: cabal haddock
81+ run: |
82+ cabal haddock --builddir "$GITHUB_WORKSPACE/doc" --haddock-for-hackage --enable-doc
83+ echo "docs=$(find "$GITHUB_WORKSPACE/doc" -maxdepth 1 -type f -name '*-docs.tar.gz')" >> "$GITHUB_ENV"
7684 - uses: actions/upload-artifact@v2
7785 with:
7886 name: Source tarball
@@ -82,3 +90,6 @@ jobs:
8290 repo_token: ${{ secrets.GITHUB_TOKEN }}
8391 file: ${{ env.dist }}
8492 tag: ${{ github.ref }}
93+ - name: Upload tarball to hackage
94+ run: |
95+ curl -X POST 'https://hackage.haskell.org/packages/candidates/' -H "Authorization: X-ApiKey ${{ secrets.HACKAGE_KEY }}" -F "package=@$dist" -w '%{url_effective}\n'