-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.qmd
More file actions
79 lines (60 loc) · 2.45 KB
/
Copy pathREADME.qmd
File metadata and controls
79 lines (60 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
title: draft-release
format: gfm
execute:
echo: false
output: asis
---
```{python}
import ccbr_actions.docs
action = ccbr_actions.docs.parse_action_yaml('action.yml')
print(ccbr_actions.docs.action_markdown_desc(action))
```
This action helps create a draft release based on the contents of the changelog and commit history.
It is designed to be used in a manually triggered workflow to draft a release.
This action checks out the latest commit in the branch you run the workflow from,
updates files (including `CHANGELOG.md`, `VERSION`, `CITATION.cff`, and `codemeta.json`),
and then creates a draft release with the new version and changelog entry.
After the workflow completes, navigate to the Releases page on GitHub and ensure
everything looks correct, then publish the release when you're ready.
## Usage
Input files:
- `CHANGELOG.md` - a changelog or news file with entries in reverse chronological order. The newest entry should contain a header with the phrase “development version”.
- `VERSION` - a single-source version file.
- `CITATION.cff` - a citation file.
For a repository's first release, set `version-tag` manually (for example
`v0.1.0`), because conventional-commit version detection may not have a
previous release to compare against.
When you're ready to draft a new release,
[run the workflow manually](https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow). After the workflow completes, there will be a new draft release that you can review and choose to publish.
### Basic example
[draft-release.yml](/examples/draft-release.yml)
```{python}
yml_file='../examples/draft-release.yml'
print('```yaml')
with open(yml_file, 'r') as infile:
print(infile.read())
print('```\n')
```
### Customized inputs
```yaml
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # required to include tags
- uses: CCBR/actions/draft-release@main
with:
github-token: ${{ github.token }}
version-tag: ${{ github.event.inputs.version-tag }}
ccbr-actions-version: main
python-verson: 3.11
draft-branch: "release-draft"
version-filepath: VERSION
changelog-filepath: CHANGELOG.md
citation-filepath: CITATION.cff
dev-header: "development version"
github-actor: "41898282+github-actions[bot]"
```
```{python}
print(ccbr_actions.docs.action_markdown_io(action))
```