Skip to content

v0.8.0 (Chamomile)

v0.8.0 (Chamomile) #13

name: Generate changelog
on:
release:
types: [published]
# pull_request:
# types: [closed]
# issues:
# types: [closed, edited]
# pull_request: # This line is for test purpose only.
# types: [opened, synchronize, reopened, labeled, unlabeled] # This line is for test purpose only.
jobs:
generate-changelog:
runs-on: ubuntu-latest
name: Generate changelog for master branch
steps:
- uses: actions/checkout@v4
- name: Generate changelog
uses: heinrichreimer/[email protected]
with:
output: CHANGELOG-generated.md
# token: ${{ secrets.GITHUB_TOKEN }}
# - name: Organize files
# run: |
# mv CHANGELOG.md CHANGELOG-generated.md
# git checkout -- CHANGELOG.md || echo "There was no CHANGELOG.md to recover"
- name: Create Pull Request
id: create-pull-request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.CHANGELOG_GENERATOR_PAT }}
commit-message: Update CHANGELOG-generated.md
committer: cb-bot <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: generate-changelog
base: master
delete-branch: true
title: '[Workflow] Update CHANGELOG-generated.md'
body: |
Update CHANGELOG-generated.md
- Updated with *today's* date
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: |
changelog
automated pr
assignees: jihoon-seo
reviewers: jihoon-seo
team-reviewers: |
owners
maintainers
draft: false
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.create-pull-request.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.create-pull-request.outputs.pull-request-url }}"
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: echo "$JOB_CONTEXT"
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: echo "$STEPS_CONTEXT"
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
- name: Dump strategy context
env:
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
run: echo "$STRATEGY_CONTEXT"
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJson(matrix) }}
run: echo "$MATRIX_CONTEXT"
# - name: Commit files
# env:
# CI_USER: cb-bot #${{ secrets.YOUR_GITHUB_USER }}
# CI_EMAIL: [email protected] #${{ secrets.YOUR_GITHUB_EMAIL }}
# run: |
# git config --local user.email "$CI_EMAIL"
# git config --local user.name "$CI_USER"
# mv CHANGELOG.md CHANGELOG-generated.md
# git checkout -- CHANGELOG.md
# git add CHANGELOG-generated.md && git commit -m 'Updated CHANGELOG-generated.md' && echo "push=true" >> $GITHUB_ENV || echo "No changes to CHANGELOG-generated.md"
# - name: Push changes
# if: env.push == 'true'
# env:
# CI_USER: cloud-barista-hub #${{ secrets.YOUR_GITHUB_USER }}
# CI_TOKEN: ${{ secrets.CHANGELOG_GENERATOR_PAT }}
# run: |
# git fetch origin master
# git rebase origin/master
# git push "https://$CI_USER:[email protected]/$GITHUB_REPOSITORY.git" HEAD:master