Fix optional test-suite/benchmark type docs
[cabal.git] / .github / workflows / changelogs.yml
blob5d3053c0b75cf9c8278bbd5476b8a7210d1ed6d8
1 name: Changelogs
3 on:
4   push:
5     branches:
6     - master
7     paths:
8     - 'changelog.d/*'
9     - '.github/workflows/changelogs.yml'
10   pull_request:
11     paths:
12     - 'changelog.d/*'
13     - '.github/workflows/changelogs.yml'
14   release:
15     types:
16       - created
18 defaults:
19   run:
20     shell: bash
22 jobs:
23   build:
24     runs-on: ubuntu-latest
26     steps:
27       - name: Set PATH
28         # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
29         run: |
30           echo "$HOME/.cabal/bin" >> $GITHUB_PATH
31       - uses: actions/cache@v1
32         with:
33           path: ~/.cabal/store
34           key: linux-store-changelogs
35       - name: ghcup
36         run: |
37           ghcup config set cache true
38           ghcup install ghc recommended
39           ghcup set ghc recommended
40       - name: Update Hackage index
41         run: cabal v2-update
42       # Cannot install it from tarball due to
43       # https://github.com/haskell/cabal/issues/7360
44       - uses: actions/checkout@v3
45         with:
46           repository: "phadej/changelog-d"
47           path: "changelog-d"
48       - name: Install changelog-d
49         run: |
50           pushd changelog-d
51           cabal v2-install
52           popd
53       - uses: actions/checkout@v3
54       - name: Run changelog-d
55         run: |
56           changelog-d changelog.d