Commit 21c19b63
21c19b633cf4Merged
Dmitriy Zhilyaev <[email protected]> ยท 2 years ago ยท 1 file ยท +1 added
Description
feat: changelog.yml as new workflow
Signed-off-by: Dmitriy Zhilyaev [email protected]
Details
- Commit
- 21c19b633cf4
- Parent
- b3607ab2e924
.github/workflows/changelog.ymladdedView file
1+
name: Changelog2+
3+
on:4+
release:5+
types: [ published ]6+
7+
jobs:8+
changelog:9+
runs-on: ubuntu-latest10+
permissions:11+
contents: write # to commit merged changelog12+
pull-requests: write # to create PR13+
steps:14+
- uses: actions/checkout@v415+
with:16+
fetch-depth: 017+
ref: main18+
19+
- uses: actions/setup-go@v520+
with:21+
go-version-file: go.mod22+
23+
- name: Download changie24+
run: go install github.com/miniscruff/changie@v125+
26+
- name: Generate release changelog27+
run: changie batch $TAG --force28+
env:29+
TAG: ${{ github.event.release.tag_name }}30+
31+
- name: Upload changelog artifact32+
uses: actions/upload-artifact@v433+
with:34+
name: changelog35+
path: .changes/${{ github.event.release.tag_name }}.md36+
37+
- name: Merge changelog38+
run: changie merge39+
40+
- name: Create Pull Request for changelog41+
uses: peter-evans/create-pull-request@v642+
with:43+
add-paths: |44+
CHANGELOG.md45+
.changes46+
commit-message: "chore: update changelog ${{ github.event.release.tag_name }}"47+
committer: GitHub <[email protected]>48+
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>49+
branch: "changelog/${{ github.event.release.tag_name }}"50+
delete-branch: true51+
title: "Changelog/${{ github.event.release.tag_name }}"