Skip to content

Commit 7916872

Browse files
Simplified workflows.
* Modified workflows to use reusable workflow from .github repo. * Moved check-release.sh script to .github repo.
1 parent 93271c9 commit 7916872

File tree

3 files changed

+10
-245
lines changed

3 files changed

+10
-245
lines changed

.github/check-release.sh

Lines changed: 0 additions & 134 deletions
This file was deleted.

.github/workflows/build.yaml

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,9 @@ on:
44
branches:
55
- "*"
66

7-
concurrency:
8-
group: build-${{ github.ref }}
9-
cancel-in-progress: true
10-
11-
env:
12-
ghc-version: 9.4.7
13-
cabal-version: 3.10.1.0
14-
157
jobs:
16-
build:
17-
runs-on: ubuntu-22.04
18-
steps:
19-
- uses: actions/checkout@v4
20-
21-
- name: Set up GHC ${{ env.ghc-version }}
22-
uses: haskell-actions/setup@latest
23-
id: setup
24-
with:
25-
ghc-version: ${{ env.ghc-version }}
26-
cabal-version: ${{ env.cabal-version }}
27-
cabal-update: true
28-
29-
- name: Configure the build
30-
run: |
31-
cabal configure --enable-tests --enable-benchmarks --disable-documentation
32-
cabal build all --dry-run
33-
34-
- name: Install dependencies
35-
run: cabal build all --only-dependencies
36-
37-
- name: Build
38-
run: cabal build all
39-
40-
- name: Run tests
41-
run: cabal test all
8+
call-workflow:
9+
uses: byteverse/.github/.github/workflows/build.yaml@main
10+
secrets: inherit
11+
with:
12+
release: false

.github/workflows/release.yaml

Lines changed: 5 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -4,81 +4,9 @@ on:
44
tags:
55
- "*"
66

7-
concurrency:
8-
group: build-${{ github.ref }}
9-
cancel-in-progress: true
10-
11-
env:
12-
ghc-version: 9.4.7
13-
cabal-version: 3.10.1.0
14-
maintainer-email: ${{ vars.MAINTAINER_EMAIL }}
15-
tag: ${{ github.ref_name }}
16-
177
jobs:
18-
build:
19-
runs-on: ubuntu-22.04
20-
steps:
21-
- uses: actions/checkout@v4
22-
23-
- name: Acquire access token
24-
id: access-token
25-
uses: actions/create-github-app-token@v1
26-
with:
27-
app-id: ${{ secrets.GITBOT_APP_ID }}
28-
private-key: ${{ secrets.GITBOT_APP_PRIVATE_KEY }}
29-
30-
- name: Run Pre-Release Checks
31-
run: |
32-
./.github/check-release.sh "${{ env.tag }}" "${{ env.maintainer-email }}"
33-
if [ $? -ne 0 ];
34-
then
35-
echo "${RESULT}"
36-
exit 1
37-
fi
38-
39-
- name: Set up GHC ${{ env.ghc-version }}
40-
uses: haskell-actions/setup@latest
41-
id: setup
42-
with:
43-
ghc-version: ${{ env.ghc-version }}
44-
cabal-version: ${{ env.cabal-version }}
45-
cabal-update: true
46-
47-
- name: Configure the build
48-
run: |
49-
cabal configure --enable-tests --enable-benchmarks --disable-documentation
50-
cabal build all --dry-run
51-
52-
- name: Install dependencies
53-
run: cabal build all --only-dependencies
54-
55-
- name: Build
56-
run: cabal build all
57-
58-
- name: Run tests
59-
run: cabal test all
60-
61-
- name: Check cabal file
62-
run: cabal check
63-
64-
- name: Build source archive
65-
run: cabal sdist --output-directory ./dist-newstyle
66-
67-
- name: Build documentation archive
68-
run: |
69-
PKG_VERSION="${{ github.event.repository.name }}-${{ env.tag }}"
70-
cabal haddock \
71-
--haddock-html-location='https://hackage.haskell.org/package/${PKG_VERSION}/docs' \
72-
--haddock-hyperlink-source \
73-
--haddock-quickjump \
74-
--haddock-for-hackage
75-
76-
- name: Create release
77-
uses: ncipollo/release-action@v1
78-
env:
79-
GITHUB_TOKEN: ${{ steps.access-token.outputs.token }}
80-
with:
81-
allowUpdates: true
82-
artifacts: "./dist-newstyle/*.tar.gz"
83-
artifactErrorsFailBuild: true
84-
generateReleaseNotes: true
8+
call-workflow:
9+
uses: byteverse/.github/.github/workflows/build.yaml@main
10+
secrets: inherit
11+
with:
12+
release: true

0 commit comments

Comments
 (0)