Skip to content

Commit 6b9aa21

Browse files
committed
add maint workflows
1 parent 4b55f88 commit 6b9aa21

File tree

5 files changed

+98
-10
lines changed

5 files changed

+98
-10
lines changed

.github/workflows/maint.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Maintain release bounds
2+
3+
on: workflow_dispatch
4+
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
9+
jobs:
10+
maint-run:
11+
name: Update release bounds
12+
runs-on: ubuntu-latest
13+
outputs:
14+
results: ${{ steps.maint.outputs.maint }}
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
token: ${{ secrets.workflow_token }}
20+
- uses: DeterminateSystems/nix-installer-action@v16
21+
with:
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
- uses: cachix/cachix-action@v15
24+
with:
25+
name: tek
26+
- id: maint
27+
name: Run maint
28+
run: |
29+
export LANG=en_US.UTF-8
30+
nix run .#maint -- --pr --fetch --output=json --target=github
31+
32+
maint-pr:
33+
name: Create PR for release bounds updates
34+
runs-on: ubuntu-latest
35+
needs: maint-run
36+
strategy:
37+
matrix:
38+
package: ${{ fromJSON(needs.maint-run.outputs.results).changes }}
39+
steps:
40+
- uses: actions/checkout@v4
41+
- id: pr
42+
name: Create PR
43+
run: |
44+
gh pr create \
45+
--base "${{ matrix.package.baseBranch }}" \
46+
--body "${{ matrix.package.message }}" \
47+
--title "revision for ${{ matrix.package.package }}" \
48+
--head "${{ matrix.package.branch }}"
49+
env:
50+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/revision.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish revision for updated bounds
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [closed]
7+
branches: ['release/**']
8+
9+
jobs:
10+
revision:
11+
name: Publish revision
12+
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: DeterminateSystems/nix-installer-action@v16
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}
19+
- uses: cachix/cachix-action@v15
20+
with:
21+
name: tek
22+
signingKey: ${{ secrets.CACHIX_SIGNING_KEY }}
23+
- id: revision
24+
name: Publish revision
25+
run: >
26+
nix run .#revision -- --fetch
27+
--hackage="hackage.haskell.org:password:${{ secrets.hackage_password }}"
28+
--branch "${{ github.base_ref }}" --trace

flake.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
src = ./packages/exon;
1313

1414
cabal = {
15+
language = "GHC2021";
1516
license = "BSD-2-Clause-Patent";
1617
license-file = "LICENSE";
1718
author = "Torsten Schmits";
@@ -65,6 +66,11 @@
6566
latest.compiler = "ghc912";
6667
};
6768

69+
hackage.repos."hackage.haskell.org" = {
70+
user = "tek";
71+
password = "";
72+
};
73+
6874
envs.dev.overrides = {bench, ...}: {
6975
exon = bench;
7076
};
@@ -92,5 +98,9 @@
9298
th-abstraction = hackage "0.7.1.0" "09wr7x9bpzyrys8id1mavk9wvqhh2smxdkfwi82kpcycm7a1z7sx";
9399
};
94100

101+
ui.experimental.managed-maint = true;
102+
103+
internal.hixCli.dev = true;
104+
95105
});
96106
}

packages/exon/exon.cabal

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ library
6161
LiberalTypeSynonyms
6262
MonadComprehensions
6363
MultiWayIf
64+
NoFieldSelectors
6465
OverloadedLabels
6566
OverloadedLists
67+
OverloadedRecordDot
6668
OverloadedStrings
6769
PackageImports
6870
PartialTypeSignatures
@@ -78,8 +80,6 @@ library
7880
UndecidableInstances
7981
UnicodeSyntax
8082
ViewPatterns
81-
OverloadedRecordDot
82-
NoFieldSelectors
8383
ghc-options: -Wall -Widentities -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wredundant-constraints -Wunused-type-patterns -Wunused-packages
8484
build-depends:
8585
base >=4.16.4.0 && <4.22
@@ -123,8 +123,10 @@ test-suite exon-test
123123
LiberalTypeSynonyms
124124
MonadComprehensions
125125
MultiWayIf
126+
NoFieldSelectors
126127
OverloadedLabels
127128
OverloadedLists
129+
OverloadedRecordDot
128130
OverloadedStrings
129131
PackageImports
130132
PartialTypeSignatures
@@ -140,8 +142,6 @@ test-suite exon-test
140142
UndecidableInstances
141143
UnicodeSyntax
142144
ViewPatterns
143-
OverloadedRecordDot
144-
NoFieldSelectors
145145
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Widentities -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wredundant-constraints -Wunused-type-patterns -Wunused-packages
146146
build-depends:
147147
base >=4.16.4.0 && <4.22
@@ -179,8 +179,10 @@ benchmark exon-bench
179179
LiberalTypeSynonyms
180180
MonadComprehensions
181181
MultiWayIf
182+
NoFieldSelectors
182183
OverloadedLabels
183184
OverloadedLists
185+
OverloadedRecordDot
184186
OverloadedStrings
185187
PackageImports
186188
PartialTypeSignatures
@@ -196,8 +198,6 @@ benchmark exon-bench
196198
UndecidableInstances
197199
UnicodeSyntax
198200
ViewPatterns
199-
OverloadedRecordDot
200-
NoFieldSelectors
201201
ghc-options: -Wall -Widentities -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wredundant-constraints -Wunused-type-patterns -Wunused-packages
202202
build-depends:
203203
base >=4.16.4.0 && <4.22

0 commit comments

Comments
 (0)