-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.63 KB
/
update-changelog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Update Changelog
on:
release:
types: [published]
jobs:
generate-changelog:
runs-on: ubuntu-latest
permissions:
contents: write
actions: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
- name: Install github-changelog-generator
run: |
gem install github_changelog_generator
- name: Generate Changelog
env:
CHANGELOG_GITHUB_TOKEN: ${{ secrets.KBOT_TOKEN }}
run: |
github_changelog_generator --user konstructio --project konstruct-ui
- name: Extract release version
id: extract_version
run: |
echo "RELEASE_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
- name: Commit and Push Changes
run: |
echo "$KBOT_PRIVATE_KEY" > ./signingkey
chmod 0600 ./signingkey
file ./signingkey
git config user.name "konstruct-bot"
git config user.email "konstruct-bot@konstruct.io"
git config user.signingkey ./signingkey
git config gpg.format ssh
git remote set-url origin https://${GITHUB_TOKEN}@github.com/${{ github.repository }}.git
git add CHANGELOG.md
git commit -S -m "🚀 chore: update changelog for the version ${RELEASE_VERSION}" --no-verify
git log --show-signature -1
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.KBOT_TOKEN }}
KBOT_PRIVATE_KEY: ${{ secrets.KBOT_PRIVATE_KEY }}