Skip to content

Commit 1f692f2

Browse files
committed
Add heylogs workflow
1 parent 3e97e27 commit 1f692f2

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/heylogs.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Heylogs
2+
3+
on: [ push ]
4+
5+
jobs:
6+
badge-job:
7+
if: startsWith(github.repository, 'nbbrd/') && startsWith(github.ref, 'refs/heads/develop')
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout source code
11+
uses: actions/checkout@v4
12+
13+
- name: Setup Java
14+
uses: actions/setup-java@v4
15+
with:
16+
distribution: 'temurin'
17+
java-version: 21
18+
cache: 'maven'
19+
20+
- name: Scan changelog
21+
run: mvn -B -ntp -U com.github.nbbrd.heylogs:heylogs-maven-plugin::scan -Dheylogs.output.file=scan.json -Dheylogs.format.id=json
22+
23+
- name: Create badges endpoint json
24+
run: |
25+
mkdir heylogs
26+
jq '{schemaVersion: 1, label: "unreleased changes", message: "#\(.[0].summary.unreleasedChanges)", color: "E05735", logoColor: "white", namedLogo: "keepachangelog"}' scan.json > heylogs/unreleased-changes.json
27+
28+
- name: Deploy badges endpoint json
29+
uses: peaceiris/actions-gh-pages@v4
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
publish_branch: badges
33+
publish_dir: ./heylogs

0 commit comments

Comments
 (0)