Skip to content

Commit

Permalink
fix release workflow (#184)
Browse files Browse the repository at this point in the history
* add build matrix to cover all packages
* only do haddock upload for kafka
  • Loading branch information
chris-martin authored Jul 25, 2024
1 parent 2e7185b commit e4a9a63
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@ on:
jobs:
tag:
runs-on: ubuntu-latest
strategy:
matrix:
package:
- freckle-app
- freckle-env
- freckle-kafka

steps:
- uses: actions/checkout@v4
- id: tag
uses: freckle/haskell-tag-action@v1
with:
package-yaml: freckle-app/package.yaml
tag-prefix: freckle-app-v
package-yaml: ${{ matrix.package }}/package.yaml
tag-prefix: ${{ matrix.package }}-v
outputs:
tag: ${{ steps.tag.outputs.tag }}

Expand All @@ -22,6 +29,12 @@ jobs:
if: needs.tag.outputs.tag

runs-on: ubuntu-latest
strategy:
matrix:
package:
- freckle-app
- freckle-env
- freckle-kafka

env:
HACKAGE_KEY: ${{ secrets.HACKAGE_UPLOAD_API_KEY }}
Expand All @@ -31,14 +44,16 @@ jobs:
- run: sudo apt-get install --assume-yes --no-install-recommends librdkafka-dev

- name: "Build with Haddocks"
if: ${{ matrix.package == 'freckle-kafka' }}
uses: freckle/stack-action@v5
with:
test: false
stack-build-arguments: --haddock --haddock-for-hackage

# Upload using our oldest, tested resolver, to set the lowest lower bounds
- name: "Release to Hackage"
run: stack --stack-yaml stack-lts-20.26.yaml upload --pvp-bounds lower freckle-app
run: stack --stack-yaml stack-lts-20.26.yaml upload --pvp-bounds lower ${{ matrix.package }}

- name: "Upload documentation"
run: stack upload --documentation freckle-app
if: ${{ matrix.package == 'freckle-kafka' }}
run: stack upload --documentation ${{ matrix.package }}

0 comments on commit e4a9a63

Please sign in to comment.