Skip to content

Commit a12aae0

Browse files
committed
breaking: it is alive!
1 parent fc6fda2 commit a12aae0

File tree

11 files changed

+5187
-82
lines changed

11 files changed

+5187
-82
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Git Changelog Github Release
2+
3+
on: [workflow_dispatch, workflow_call, push]
4+
5+
jobs:
6+
build:
7+
runs-on: 'ubuntu-latest'
8+
steps:
9+
- uses: actions/checkout@v4
10+
with:
11+
fetch-tags: 'true'
12+
fetch-depth: '0'
13+
- name: Setup java
14+
uses: actions/setup-java@v2
15+
with:
16+
distribution: 'zulu'
17+
java-version: 17
18+
- uses: tomasbjerre/git-changelog-github-release@main
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,40 @@
22

33
This is a
44
[GitHub action](https://docs.github.com/en/actions/creating-actions/about-custom-actions)
5-
that can:
5+
that can draft release in GitHub generated from template using
6+
[git-changelog-lib](https://github.com/tomasbjerre/git-changelog-lib).
67

7-
- Draft release in GitHub generated from template using
8-
[git-changelog-lib](https://github.com/tomasbjerre/git-changelog-lib).
8+
- You can have it running on your **default branch**, not depending on
9+
pull-requests.
10+
- Uses **conventional commits** to keep a **draft release** updated and ready to
11+
be published.
12+
- It will parse any commit in branch and construct the **draft description**
13+
from that.
14+
- It will **adjust the draft version** based on conventional commits.
15+
16+
## Usage
17+
18+
- Create a file, perhaps `.github/workflows/draft-release.yaml`, with content:
19+
20+
```yaml
21+
name: Git Changelog Github Release
22+
23+
on: [workflow_dispatch, workflow_call, push]
24+
25+
jobs:
26+
build:
27+
runs-on: 'ubuntu-latest'
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
fetch-tags: 'true'
32+
fetch-depth: '0'
33+
- name: Setup java
34+
uses: actions/setup-java@v2
35+
with:
36+
distribution: 'zulu'
37+
java-version: 17
38+
- uses: tomasbjerre/git-changelog-github-release@main
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needs write permission in Github menu '/settings/actions'
41+
```

action.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@ branding:
88
color: white
99
icon: archive
1010
inputs:
11+
draft:
12+
required: true
13+
description: 'If it should be a draft in GitHub or an actual release'
14+
default: 'true'
1115
template:
1216
description: |
1317
Rendered and used as description. See https://github.com/tomasbjerre/git-changelog-lib for documentation.
1418
required: false
1519
default: |
16-
{{#with tags.[0]}}
20+
{{#tags}}
21+
{{#ifEquals name "Unreleased"}}
1722
{{#ifContainsBreaking commits}}
18-
#💣 Breaking changes
23+
# 💣 Breaking changes
1924
2025
{{#commits}}
2126
{{#ifCommitBreaking .}}
@@ -25,7 +30,7 @@ inputs:
2530
2631
{{/ifContainsBreaking}}
2732
{{#ifContainsType commits type='feat'}}
28-
#🚀 Features
33+
# 🚀 Features
2934
3035
{{#commits}}
3136
{{#ifCommitType . type='feat'}}
@@ -35,7 +40,7 @@ inputs:
3540
3641
{{/ifContainsType}}
3742
{{#ifContainsType commits type='fix'}}
38-
#🐛 Bug Fixes
43+
# 🐛 Bug Fixes
3944
4045
{{#commits}}
4146
{{#ifCommitType . type='fix'}}
@@ -45,7 +50,7 @@ inputs:
4550
4651
{{/ifContainsType}}
4752
{{#ifContainsType commits type='^($|(?!fix|feat|breaking))'}}
48-
#🧰 Other changes
53+
# 🧰 Other changes
4954
5055
{{#commits}}
5156
{{#ifCommitType . type='^$'}}
@@ -61,4 +66,16 @@ inputs:
6166
{{/commits}}
6267
6368
{{/ifContainsType}}
64-
{{/with}}
69+
{{/ifEquals}}
70+
{{/tags}}
71+
outputs:
72+
id:
73+
description: Of created release
74+
html_url:
75+
description: Of created release
76+
upload_url:
77+
description: Of created release
78+
version:
79+
description: Of created release
80+
description:
81+
description: That was reated

dist/cli.jar

11.6 MB
Binary file not shown.

0 commit comments

Comments
 (0)