Update Changelog #16
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: [released] | |
permissions: | |
contents: write | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout Main Branch | |
uses: actions/checkout@v2 | |
with: | |
ref: main # Start from the main branch | |
- name: Create Unique Branch for Changelog Update | |
run: | | |
TIMESTAMP=$(date +%s) | |
git checkout -b update-changelog-$TIMESTAMP | |
- name: Update Changelog | |
uses: stefanzweifel/changelog-updater-action@v1 | |
with: | |
latest-version: ${{ github.event.release.tag_name }} | |
release-notes: ${{ github.event.release.body }} | |
- name: Commit updated CHANGELOG | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
branch: update-changelog-${{ github.run_id }} # Use a unique branch name | |
commit_message: "Update CHANGELOG" | |
file_pattern: CHANGELOG.md | |
- name: Push changes and create PR | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
branch: update-changelog-${{ github.run_id }} | |
base: main # Target main for the PR | |
title: "Automated Update of CHANGELOG" | |
body: "This PR was created by GitHub Actions to update the CHANGELOG." | |
delete-branch: true # Automatically delete the branch after merging |