Skip to content

Commit b34ae73

Browse files
committed
ci: only run semantic-release after stack-build
1 parent 4c957c8 commit b34ae73

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.github/workflows/conventional-commits.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
---
2-
name: Conventional commits
3-
2+
name: conventional-commits
43
on:
54
pull_request:
6-
branches:
7-
- main
5+
branches: [main]
86

97
jobs:
108
build:

.github/workflows/semantic-release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
2-
name: Semantic release
2+
name: semantic-release
33
on:
4-
push:
5-
branches:
6-
- main
4+
workflow_run:
5+
workflows: [stack-build]
6+
types: [completed]
7+
branches: [main]
78

89
jobs:
910
build:

.github/workflows/stack-build.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111

1212
jobs:
1313
build:
14-
name: ${{ matrix.os }} / ghc ${{ matrix.ghc-version }}
14+
name: ghc-${{ matrix.ghc-version }} / ${{ matrix.os }}
1515
runs-on: ${{ matrix.os }}-latest
1616
strategy:
1717
fail-fast: false
@@ -41,9 +41,13 @@ jobs:
4141
cabal-version: latest
4242
cabal-update: true
4343
enable-stack: true
44+
stack-setup-ghc: true
45+
stack-no-global: true
4446

4547
- name: Configure the build
4648
run: |
49+
# generate the .cabal file
50+
stack clean
4751
cabal configure --enable-tests --enable-benchmarks --disable-documentation
4852
cabal build --dry-run
4953
# The last step generates dist-newstyle/cache/plan.json for the cache key.
@@ -59,9 +63,6 @@ jobs:
5963
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}
6064
restore-keys: ${{ env.key }}-
6165

62-
- name: Generate cabal file
63-
run: stack clean
64-
6566
- name: Install dependencies
6667
run: cabal build all --only-dependencies
6768

0 commit comments

Comments
 (0)