9 - '.github/workflows/changelogs.yml'
13 - '.github/workflows/changelogs.yml'
25 runs-on: ubuntu-latest
29 # Cannot install changelog-d directly from remote tarball due to
30 # https://github.com/haskell/cabal/issues/7360
31 # Also, we would like to get the build plan for the cache key.
32 - name: Fetch changelog-d
34 changelog_d_latest="$(curl https://codeberg.org/api/v1/repos/fgaz/changelog-d/branches/master | jq -r .commit.id)"
35 echo "Using changelog-d revision $changelog_d_latest"
36 curl "https://codeberg.org/fgaz/changelog-d/archive/$changelog_d_latest.tar.gz" -o changelog-d.tar.gz
37 tar -xf changelog-d.tar.gz
39 - name: Update Hackage index
42 - name: Build plan for changelog-d
43 working-directory: changelog-d
45 cabal v2-build --dry-run --allow-newer=changelog-d:base
47 - name: Restore dependencies of changelog-d
48 uses: actions/cache/restore@v4
51 path: ~/.local/state/cabal
52 key: linux-store-changelogs-${{ hashfiles('changelog-d/dist-newstyle/cache/plan.json') }}
53 restore-keys: linux-store-changelogs
55 - name: Install changelog-d
56 working-directory: changelog-d
58 cabal v2-install --allow-newer=changelog-d:base
60 - name: Cache dependencies of changelog-d
61 uses: actions/cache/save@v4
62 if: always() && steps.cache.outputs.cache-hit != 'true'
64 path: ~/.local/state/cabal
65 key: ${{ steps.cache.outputs.cache-primary-key }}
67 - name: Checkout cabal sources
68 uses: actions/checkout@v4
70 - name: Run changelog-d
72 changelog-d changelog.d