Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate PR with release notes draft #7604

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Drafter
name: Draft Release Notes

on:
push:
Expand All @@ -14,13 +14,36 @@ jobs:
permissions:
# write permission is required to create a github release
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348 #v6.0.0
- name: Draft release notes
id: draft
uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348 #v6.0.0
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitish: main
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: Copy release notes from Draft
run: |
tag_name=${{ steps.draft.outputs.tag_name }}
echo "${{ steps.draft.outputs.body }}" > docs/release_notes/${tag_name:1}.md
- name: Upsert pull request
uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 #v6.0.0
with:
commit-message: Add release notes for ${{ steps.draft.outputs.tag_name }}
committer: eksctl-bot <[email protected]>
body: |
Auto-generated by [eksctl Draft Release Notes GitHub workflow][1]

[1]: https://github.com/eksctl-io/eksctl/blob/main/.github/workflows/release-drafter.yaml
title: 'Add release notes for ${{ steps.draft.outputs.tag_name }}'
labels: kind/improvement, skip-release-notes
branch: update-release-notes