Skip to content

Commit 4adc837

Browse files
committed
Fix the changelog generation
1 parent 3d0bec0 commit 4adc837

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed

.github/ci-upgrade.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
values:
22
changelogAdditionalArgs:
33
- --tag-skip=3.23.0
4+
5+
disabled:
6+
- changelogCreateRelease

.github/workflows/changelog.yaml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Changelog Generator
33
on:
44
schedule:
55
- cron: 0 0 * * 1,4
6-
push:
7-
tags:
8-
- '*.*.*'
6+
repository_dispatch:
7+
types:
8+
- changelog
99

1010
jobs:
1111
changelog:
@@ -14,17 +14,6 @@ jobs:
1414
timeout-minutes: 30
1515

1616
steps:
17-
- uses: actions/checkout@v4
18-
if: github.event_name == 'push' && github.ref_type == 'tag'
19-
- name: Create release
20-
run: |-
21-
if [[ ${{ github.ref_name }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
22-
gh release create ${{ github.ref_name }} --generate-notes || true
23-
fi
24-
if: github.event_name == 'push' && github.ref_type == 'tag'
25-
env:
26-
GH_TOKEN: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }}
27-
2817
- name: Get Date
2918
id: get-date
3019
run: echo "date=$(/bin/date -u "+%Y%m%d%H%M%S")" >> $GITHUB_OUTPUT

.github/workflows/main.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ on:
1212
permissions:
1313
packages: write
1414

15+
actions: write
16+
contents: write
17+
1518
env:
1619
HAS_SECRETS: ${{ secrets.HAS_SECRETS }}
1720

1821
jobs:
19-
build:
22+
main:
2023
runs-on: ubuntu-22.04
2124
timeout-minutes: 30
2225
name: Continuous integration
@@ -226,3 +229,16 @@ jobs:
226229
cd ${GITHUB_WORKSPACE}/mapfish-print-doc
227230
git push origin gh-pages
228231
if: github.ref == 'refs/heads/master' && env.HAS_SECRETS == 'HAS_SECRETS'
232+
233+
- name: Trigger changelog workflow
234+
uses: actions/github-script@v6
235+
with:
236+
script: |-
237+
if (process.env.GITHUB_REF_TYPE == 'tag') {
238+
console.log('Trigger changelog');
239+
await github.rest.repos.createDispatchEvent({
240+
owner: 'camptocamp',
241+
repo: 'helm-mutualize',
242+
event_type: 'changelog',
243+
});
244+
}

0 commit comments

Comments
 (0)