|
9 | 9 | name: Prepare Next Release |
10 | 10 | runs-on: ubuntu-latest |
11 | 11 | steps: |
12 | | - - uses: actions/checkout@v2 |
13 | | - - name: Extract Text |
14 | | - id: text |
15 | | - run: | |
16 | | - export CHANGELOG="$(csplit -s -f changelog CHANGELOG.md "/^## .*$/" "{2}" && cat changelog01 | egrep -v "^## .*$" | sed "s/^$//" | sed "s/\* //g" | sed "s/^ *//g")" |
17 | | - CHANGELOG="${CHANGELOG//'%'/'%25'}" |
18 | | - CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" |
19 | | - CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" |
20 | | - echo "changelog=$(echo "$CHANGELOG")" >> $GITHUB_OUTPUT |
21 | | - echo "date=$(echo "$(date +"%Y.%-m.%-d.%H%M")")" >> $GITHUB_OUTPUT |
22 | | - - name: Print Changelog |
23 | | - run: | |
24 | | - echo "date: ${{ steps.text.outputs.date }}" |
25 | | - echo "${{ steps.text.outputs.changelog }}" |
26 | | - - name: Delete drafts |
27 | | - uses: hugo19941994/[email protected] |
28 | | - env: |
29 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
30 | | - - name: Draft Next Release |
31 | | - |
32 | | - with: |
33 | | - tag: ${{ steps.text.outputs.date }} |
34 | | - name: ${{ steps.text.outputs.date }} |
35 | | - token: ${{ secrets.GITHUB_TOKEN }} |
36 | | - body: ${{ steps.text.outputs.changelog }} |
37 | | - draft: true |
38 | | - allow_override: true |
| 12 | + - uses: actions/checkout@v2 |
| 13 | + - name: Extract Text |
| 14 | + id: text |
| 15 | + run: | |
| 16 | + export CHANGELOG="$(csplit -s -f changelog CHANGELOG.md "/^## .*$/" "{2}" && cat changelog01 | egrep -v "^## .*$" | sed "s/^$//" | sed "s/\* //g" | sed "s/^ *//g")" |
| 17 | + echo "CHANGELOG=$CHANGELOG" |
| 18 | + echo "changelog<<EOF" >> $GITHUB_OUTPUT |
| 19 | + echo "$CHANGELOG" >> $GITHUB_OUTPUT |
| 20 | + echo "EOF" >> $GITHUB_OUTPUT |
| 21 | + echo "date=$(echo "$(date +"%Y.%-m.%-d.%H%M")")" >> $GITHUB_OUTPUT |
| 22 | + - name: Print Changelog |
| 23 | + run: | |
| 24 | + echo "date: ${{ steps.text.outputs.date }}" |
| 25 | + echo "${{ steps.text.outputs.changelog }}" |
| 26 | + - name: Delete drafts |
| 27 | + uses: hugo19941994/[email protected] |
| 28 | + env: |
| 29 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 30 | + - name: Draft Next Release |
| 31 | + |
| 32 | + with: |
| 33 | + tag: ${{ steps.text.outputs.date }} |
| 34 | + name: ${{ steps.text.outputs.date }} |
| 35 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 36 | + body: | |
| 37 | + <!-- Please, when releasing OSS libraries, then wait until they are really available in the Maven Central. --> |
| 38 | + <!-- You can use https://search.maven.org website. --> |
| 39 | + ${{ steps.text.outputs.changelog }} |
| 40 | + draft: true |
| 41 | + allow_override: true |
0 commit comments