update version bound in cabal file #84
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
name: "ci" | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
release: | |
types: ["published"] | |
jobs: | |
hlint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Set up hlint" | |
uses: haskell/actions/hlint-setup@v2 | |
with: | |
version: "3.6.1" | |
- name: "Run hlint" | |
uses: haskell/actions/hlint-run@v2 | |
with: | |
path: '["src/", "test/"]' | |
fail-on: warning | |
fourmolu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: haskell-actions/run-fourmolu@v9 | |
with: | |
version: "0.14.1.0" | |
cabal: | |
name: cabal ${{ matrix.cabal }} / ghc ${{ matrix.ghc }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ["ubuntu-latest"] | |
cabal: ["3.10.2.0"] | |
ghc: | |
- "9.4.8" | |
- "9.6.3" | |
- "9.8.1" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: "./.github/actions/cabal-build" | |
name: Build | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: ${{ matrix.cabal }} | |
stack: | |
name: stack ${{ matrix.stack }} / ${{ matrix.resolver }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ["ubuntu-latest"] | |
stack: ["2.13.1"] | |
resolver: | |
- "lts-21" | |
- "lts-22" | |
- "nightly" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: "./.github/actions/stack-build" | |
name: Build | |
with: | |
resolver: ${{ matrix.resolver }} | |
stack-version: ${{ matrix.stack }} | |
publish: | |
name: "publish" | |
runs-on: "ubuntu-latest" | |
needs: | |
- hlint | |
- fourmolu | |
- cabal | |
- stack | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: haskell/actions/setup@v2 | |
id: setup-haskell-cabal | |
name: Setup Haskell and Cabal | |
with: | |
ghc-version: "9.8.1" | |
cabal-version: "3.10.2.0" | |
- name: Freeze | |
run: | | |
cabal freeze | |
head -n -1 cabal.project.freeze > deps | |
- uses: actions/[email protected] | |
name: Cache ~/.cabal/store | |
with: | |
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} | |
key: publish-${{ hashFiles('deps') }} | |
- name: "Bundle the package" | |
run: | | |
cabal sdist | |
- name: "Bundle the documentation" | |
run: | | |
cabal haddock --haddock-for-hackage --enable-doc | |
- name: "Publish package to Hackage" | |
if: github.event_name == 'release' | |
env: | |
HACKAGE_USER: ${{ secrets.HACKAGE_USER }} | |
HACKAGE_PASSWORD: ${{ secrets.HACKAGE_PASSWORD }} | |
run: | | |
cabal upload --publish -u $HACKAGE_USER -p $HACKAGE_PASSWORD ./dist-newstyle/sdist/*.tar.gz | |
- name: "Publish candidate package to Hackage" | |
if: github.event_name == 'push' | |
env: | |
HACKAGE_USER: ${{ secrets.HACKAGE_USER }} | |
HACKAGE_PASSWORD: ${{ secrets.HACKAGE_PASSWORD }} | |
run: | | |
cabal upload -u $HACKAGE_USER -p $HACKAGE_PASSWORD ./dist-newstyle/sdist/*.tar.gz | |
- name: "Publish docs to Hackage" | |
if: github.event_name == 'release' | |
env: | |
HACKAGE_USER: ${{ secrets.HACKAGE_USER }} | |
HACKAGE_PASSWORD: ${{ secrets.HACKAGE_PASSWORD }} | |
run: | | |
cabal upload --publish -u $HACKAGE_USER -p $HACKAGE_PASSWORD -d ./dist-newstyle/*-docs.tar.gz | |
- name: "Publish candidate docs to Hackage" | |
if: github.event_name == 'push' | |
env: | |
HACKAGE_USER: ${{ secrets.HACKAGE_USER }} | |
HACKAGE_PASSWORD: ${{ secrets.HACKAGE_PASSWORD }} | |
run: | | |
cabal upload -u $HACKAGE_USER -p $HACKAGE_PASSWORD -d ./dist-newstyle/*-docs.tar.gz |