Merge pull request #183 from agorapulse/upgrade/com.agorapulse/micron… #181
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Draft Release Notes | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Prepare Next Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Extract Text | |
id: text | |
run: | | |
export CHANGELOG="$(csplit -s -f changelog CHANGELOG.md "/^## .*$/" "{2}" && cat changelog01 | egrep -v "^## .*$" | sed "s/^$//" | sed "s/\* //g" | sed "s/^ *//g")" | |
echo "CHANGELOG=$CHANGELOG" | |
echo "changelog<<EOF" >> $GITHUB_OUTPUT | |
echo "$CHANGELOG" >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
echo "date=$(echo "$(date +"%Y.%-m.%-d.%H%M")")" >> $GITHUB_OUTPUT | |
- name: Print Changelog | |
run: | | |
echo "date: ${{ steps.text.outputs.date }}" | |
echo "${{ steps.text.outputs.changelog }}" | |
- name: Delete drafts | |
uses: hugo19941994/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Draft Next Release | |
uses: meeDamian/[email protected] | |
with: | |
tag: ${{ steps.text.outputs.date }} | |
name: ${{ steps.text.outputs.date }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
body: | | |
<!-- Please, when releasing OSS libraries, then wait until they are really available in the Maven Central. --> | |
<!-- You can use https://search.maven.org website. --> | |
${{ steps.text.outputs.changelog }} | |
draft: true | |
allow_override: true |