Skip to content

Commit ffb7054

Browse files
committed
Generate a changelog during release creation
The arduino/create-changelog action generates a changelog from the commit history. With this added to the release description by the release workflow, only a little manual work is needed to produce a well documented release.
1 parent 014e2e0 commit ffb7054

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,15 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13+
- name: Set environment variables
14+
run: |
15+
# See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
16+
echo "CHANGELOG_PATH=${{ runner.temp }}/CHANGELOG.md" >> "$GITHUB_ENV"
17+
1318
- name: Checkout repository
1419
uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
1522

1623
- name: Install Taskfile
1724
uses: arduino/setup-task@v1
@@ -27,8 +34,17 @@ jobs:
2734
- name: Build project
2835
run: task go:build
2936

37+
- name: Create changelog
38+
uses: arduino/create-changelog@v1
39+
with:
40+
tag-regex: '^[0-9]+\.[0-9]+\.[0-9]+.*$'
41+
filter-regex: '^\[(skip|changelog)[ ,-](skip|changelog)\].*'
42+
case-insensitive-regex: true
43+
changelog-file-path: ${{ env.CHANGELOG_PATH }}
44+
3045
- name: Create Github Release and upload artifacts
3146
uses: ncipollo/release-action@v1
3247
with:
3348
token: ${{ secrets.GITHUB_TOKEN }}
49+
bodyFile: ${{ env.CHANGELOG_PATH }}
3450
artifacts: parser

0 commit comments

Comments
 (0)