-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
27 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,30 +9,33 @@ jobs: | |
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")" | ||
CHANGELOG="${CHANGELOG//'%'/'%25'}" | ||
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" | ||
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" | ||
echo "changelog=$(echo "$CHANGELOG")" >> $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: ${{ steps.text.outputs.changelog }} | ||
draft: true | ||
allow_override: true | ||
- 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 |