WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Release Notes Draft generator #165

Release Notes Draft generator

Release Notes Draft generator #165

name: Release Notes Draft generator
on:
workflow_dispatch:
inputs:
branch:
type: string
required: true
default: "9.0"
last_release:
type: string
required: true
default: "9.0.0"
permissions:
contents: write
pull-requests: write
issues: write
jobs:
main:
runs-on: ubuntu-latest
env:
BRANCH: ${{ github.event.inputs.branch }}
LAST_RELEASE: ${{ github.event.inputs.last_release }}
ACTOR: ${{ github.actor }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- name: Validate the supplied target branch and last release tag exist
run: |
if ! git rev-parse --verify "origin/${BRANCH}" >/dev/null 2>&1; then
echo "Error: Branch ${BRANCH} does not exist"
exit 1
fi
if ! git rev-parse --verify "v${LAST_RELEASE}" >/dev/null 2>&1; then
echo "Error: Tag v${LAST_RELEASE} does not exist"
exit 1
fi
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "logstashmachine"
- name: Create Release Notes Draft
run: |
if [[ "${BRANCH}" =~ ^([0-8])\.[0-9]+$ ]]; then
echo "Using Asciidoc generator"
SCRIPT="./tools/release/generate_release_notes.rb"
else
echo "Using Markdown generator"
SCRIPT="./tools/release/generate_release_notes_md.rb"
fi
$SCRIPT "${BRANCH}" "${LAST_RELEASE}" "${ACTOR}" "${{ secrets.GITHUB_TOKEN }}"