Skip to content

Commit a5b2c41

Browse files
committed
chore: create changelog using github actions
1 parent faa23f6 commit a5b2c41

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/changelog.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: changelog
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- stable-*
8+
pull_request:
9+
branches:
10+
- master
11+
- stable-*
12+
13+
permissions:
14+
contents: write
15+
16+
jobs:
17+
changelog:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: checkout
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23+
with:
24+
fetch-depth: 0
25+
26+
- name: generate changelog
27+
id: changelog
28+
uses: actionhippie/calens@244f3e5c328b842a740113859b87bbebf697f63b # v1.13.1
29+
with:
30+
target: CHANGELOG.md
31+
32+
- name: check for changes
33+
id: diff
34+
run: |
35+
if git diff --quiet --exit-code; then
36+
echo "has_changes=false" >> "$GITHUB_OUTPUT"
37+
else
38+
echo "has_changes=true" >> "$GITHUB_OUTPUT"
39+
fi
40+
41+
- name: publish
42+
if: github.event_name != 'pull_request' && steps.diff.outputs.has_changes == 'true'
43+
run: |
44+
git config user.email 'devops@owncloud.com'
45+
git config user.name 'ownClouders'
46+
git commit -am 'Automated changelog update [skip ci]'
47+
git push origin HEAD:${{ github.ref_name }}

0 commit comments

Comments
 (0)