Update Changelog #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |