Skip to content

Commit 17c357f

Browse files
authored
feat: add GitHub release config (#423)
* feat: add GitHub release config Signed-off-by: Henry Schreiner <[email protected]> * chore: use cog Signed-off-by: Henry Schreiner <[email protected]> --------- Signed-off-by: Henry Schreiner <[email protected]>
1 parent dcd523c commit 17c357f

File tree

4 files changed

+43
-1
lines changed

4 files changed

+43
-1
lines changed

.github/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
changelog:
2+
exclude:
3+
authors:
4+
- dependabot
5+
- pre-commit-ci

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,5 @@ repos:
8686
name: Cog the pages
8787
language: python
8888
entry: cog -P -r -I ./helpers
89-
files: "^docs/pages/guides/(packaging_compiled|docs|tasks).md|^copier.yml"
89+
files: "^docs/pages/guides/(packaging_compiled|docs|tasks|gha_basic).md|^copier.yml"
9090
additional_dependencies: [cogapp, cookiecutter]

docs/pages/guides/gha_basic.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ which consist of actions. Here are some of the workflows you will probably want
2424
in your package. These should be in a file named `.github/workflows/main.yml` or
2525
similar.
2626

27+
<!-- [[[cog
28+
from cog_helpers import code_fence, render_cookie
29+
with render_cookie() as package:
30+
github_release_yaml = package.joinpath(".github/release.yml").read_text(encoding="utf-8").strip()
31+
]]] -->
32+
<!-- [[[end]]] -->
33+
2734
## Header
2835

2936
Your main CI workflow file should begin something like this:
@@ -710,3 +717,28 @@ everything in one job, you only need one of these.
710717
>
711718
> - [CLIUtils.github.io/CLI11](https://github.com/CLIUtils/CLI11/blob/main/.github/workflows/docs.yml)
712719
> - [iris-hep.org](https://github.com/iris-hep/iris-hep.github.io/blob/master/.github/workflows/deploy.yml)
720+
721+
### Changelog generation
722+
723+
Not directly part of Actions, but also in `.github` is `.github/release.yml`,
724+
which lets you [configure the changelog generation][gh-changelog] button when
725+
you make a release. The following config will remove dependabot and
726+
pre-commit-ci PRs for you:
727+
728+
<!-- [[[cog
729+
with code_fence("yaml"):
730+
print(github_release_yaml)
731+
]]] -->
732+
<!-- prettier-ignore-start -->
733+
```yaml
734+
changelog:
735+
exclude:
736+
authors:
737+
- dependabot
738+
- pre-commit-ci
739+
```
740+
<!-- prettier-ignore-end -->
741+
<!-- [[[end]]] -->
742+
743+
[gh-changelog]:
744+
https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
changelog:
2+
exclude:
3+
authors:
4+
- dependabot
5+
- pre-commit-ci

0 commit comments

Comments
 (0)