|
4 | 4 | tags: |
5 | 5 | - "*" |
6 | 6 |
|
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 | | - |
17 | 7 | 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