Skip to content

Commit 51a40d9

Browse files
committed
feat(workflow): attach HTML changelog to releases
Generate an HTML changelog alongside the existing forum format and attach it as a release asset. This gives the marketing team a ready-to-use HTML file for each release without manual generation. Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
1 parent f897ec6 commit 51a40d9

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

.github/workflows/generate-release-changelog.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,39 @@ jobs:
8686
run: |
8787
echo '{"username": "github-actions"}' > github_helper/credentials.json
8888
89+
- name: Install github_helper dependencies
90+
run: |
91+
cd github_helper/changelog
92+
composer install
93+
8994
# Since this action only runs on nextcloud-releases, ignoring is okay
90-
- name: Generate changelog between ${{ env.PREVIOUS_TAG }} and ${{ github.ref_name }} # zizmor: ignore[template-injection]
95+
- name: Generate forum changelog between ${{ env.PREVIOUS_TAG }} and ${{ github.ref_name }} # zizmor: ignore[template-injection]
9196
env:
9297
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9398
run: |
9499
cd github_helper/changelog
95-
composer install
96100
php index.php generate:changelog --no-bots --format=forum server ${{ env.PREVIOUS_TAG }} ${{ github.ref_name }} > changelog.md
97101
102+
# Since this action only runs on nextcloud-releases, ignoring is okay
103+
- name: Generate HTML changelog between ${{ env.PREVIOUS_TAG }} and ${{ github.ref_name }} # zizmor: ignore[template-injection]
104+
env:
105+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106+
run: |
107+
cd github_helper/changelog
108+
php index.php generate:changelog --no-bots --format=html server ${{ env.PREVIOUS_TAG }} ${{ github.ref_name }} > "${{ github.ref_name }}.html"
109+
98110
# Since this action only runs on nextcloud-releases, ignoring is okay
99111
- name: Set changelog to release # zizmor: ignore[template-injection]
100112
env:
101113
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102114
run: |
103115
cd server
104116
gh release edit ${{ github.ref_name }} --notes-file "../github_helper/changelog/changelog.md" --title "${{ github.ref_name }}"
117+
118+
# Since this action only runs on nextcloud-releases, ignoring is okay
119+
- name: Attach HTML changelog to release # zizmor: ignore[template-injection]
120+
env:
121+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
122+
run: |
123+
cd server
124+
gh release upload ${{ github.ref_name }} "../github_helper/changelog/${{ github.ref_name }}.html" --clobber

0 commit comments

Comments
 (0)