Skip to content

Update the CHANGELOG #12

Update the CHANGELOG

Update the CHANGELOG #12

name: Update the CHANGELOG
on:
release:
types: [edited, deleted]
env:
BRANCH_REFERENCE: refs/heads/master
DEPLOY_USER: "ExtendedXmlSerializer's GitHub Action Automation Agent"
DEPLOY_EMAIL: "[email protected]"
DEPLOY_COMMIT_MESSAGE: Generated CHANGELOG.md
jobs:
information:
runs-on: ubuntu-latest
steps:
- name: Output Information
run: |
echo "****************************************************"
echo "Event name: ${{ github.event_name }}"
echo "Action type: ${{ github.event.action }}"
echo "****************************************************"
generate_and_save:
runs-on: ubuntu-latest
needs: [information]
steps:
- id: generate
name: Generate CHANGELOG
uses: dragonspark/action-changelog-dawg@master
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload CHANGELOG
uses: actions/upload-artifact@v4
with:
name: store
path: '${{ steps.generate.outputs.filename }}'
load_and_push:
runs-on: ubuntu-latest
needs: [generate_and_save]
steps:
- uses: actions/checkout@master
with:
ref: refs/heads/master
- name: Download the CHANGELOG
uses: actions/[email protected]
with:
name: store
path: ./
- name: Get base branch
id: vars
run: |
base_ref=${{ env.BRANCH_REFERENCE }}
echo ::set-output name=base_branch::${base_ref#refs/*/}
- name: Create Pull Request for CHANGELOG
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: ${{ env.DEPLOY_COMMIT_MESSAGE }}
author: '${{ env.DEPLOY_USER }} <${{ env.DEPLOY_EMAIL }}>'
title: '[Automated] ${{ env.DEPLOY_COMMIT_MESSAGE }}'
body: |
Automated Pull Request
- Event Name: ${{ github.event_name }}
- Event Type: ${{ github.event.action }}
- Proudly Auto-generated using [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: automerge
base: ${{ steps.vars.outputs.base_branch }}
branch: automated/changelog