Skip to content

Commit

Permalink
Use matrix.include to decide if haddocks need uploading
Browse files Browse the repository at this point in the history
Originally, I thought only `freckle-kafka` needed this, but since
`freckle-app` is still depending on everything, nothing about it's
system needs have changed, so it too needs haddocks manually built
(still).

Now that we have two packages like this, we can move to an
`include`-style, which is much easier to maintain.
  • Loading branch information
pbrisbin committed Sep 19, 2024
1 parent 968ebbd commit a524859
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ jobs:
- freckle-otel
- freckle-prelude

include:
# Packages with system dependencies (librdkafka, libpq) need haddocks
# built and uploaded manually.
- package: freckle-kafka
upload-haddocks: true
- package: freckle-app
upload-haddocks: true

env:
HACKAGE_KEY: ${{ secrets.HACKAGE_UPLOAD_API_KEY }}

Expand All @@ -54,7 +62,7 @@ jobs:
- run: sudo apt-get install --assume-yes --no-install-recommends librdkafka-dev

- name: "Build with Haddocks"
if: ${{ matrix.package == 'freckle-kafka' }}
if: ${{ matrix.upload-haddocks }}
uses: freckle/stack-action@v5
with:
test: false
Expand All @@ -65,5 +73,5 @@ jobs:
run: stack --stack-yaml stack-lts-20.26.yaml upload --pvp-bounds lower ${{ matrix.package }}

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

0 comments on commit a524859

Please sign in to comment.