commit
e50ac4f404
|
@ -15,20 +15,19 @@ jobs:
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
name: "debug"
|
name: "debug"
|
||||||
outputs:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: "checkout"
|
- name: "checkout"
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
# ## opening a debug console
|
## opening a debug console
|
||||||
# - name: Setup upterm session
|
- name: Setup upterm session
|
||||||
# env:
|
env:
|
||||||
# ZENODO_SANDBOX_ACCESS_TOKEN: ${{ secrets.ZENODO_SANDBOX_ACCESS_TOKEN }}
|
ZENODO_SANDBOX_ACCESS_TOKEN: ${{ secrets.ZENODO_SANDBOX_ACCESS_TOKEN }}
|
||||||
# uses: lhotari/action-upterm@v1
|
uses: lhotari/action-upterm@v1
|
||||||
# with:
|
with:
|
||||||
# limit-access-to-actor: true
|
limit-access-to-actor: true
|
||||||
|
|
||||||
# debug1:
|
# debug1:
|
||||||
# name: "debug 1"
|
# name: "debug 1"
|
||||||
|
|
|
@ -106,7 +106,7 @@ jobs:
|
||||||
# 2. create release note
|
# 2. create release note
|
||||||
- name: "create release note"
|
- name: "create release note"
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ needs.version.outputs.new }}
|
NEW_VERSION=${{ needs.version.outputs.new }}
|
||||||
CURRENT_VERSION=${{ needs.version.outputs.current }}
|
CURRENT_VERSION=${{ needs.version.outputs.current }}
|
||||||
STATUS=0
|
STATUS=0
|
||||||
## =================================
|
## =================================
|
||||||
|
@ -114,18 +114,18 @@ jobs:
|
||||||
## ---------------------------------
|
## ---------------------------------
|
||||||
TOP=$(grep -n "## \[Unreleased\]" CHANGELOG.md | cut -d: -f1)
|
TOP=$(grep -n "## \[Unreleased\]" CHANGELOG.md | cut -d: -f1)
|
||||||
BOTTOM=$(grep -n -m 1 "## Version \[$CURRENT_VERSION\]" CHANGELOG.md | cut -d: -f1)
|
BOTTOM=$(grep -n -m 1 "## Version \[$CURRENT_VERSION\]" CHANGELOG.md | cut -d: -f1)
|
||||||
awk "NR>$TOP&&NR<$BOTTOM" CHANGELOG.md > release-note-v$VERSION.md
|
awk "NR>$TOP&&NR<$BOTTOM" CHANGELOG.md > release-note-v$NEW_VERSION.md
|
||||||
sed -i -- "s/###/##/g" release-note-v$VERSION.md
|
sed -i -- "s/###/##/g" release-note-v$NEW_VERSION.md
|
||||||
## =================================
|
## =================================
|
||||||
## check if release note is empty
|
## check if release note is empty
|
||||||
## ---------------------------------
|
## ---------------------------------
|
||||||
WORD_COUNT=$(wc -w release-note-v$VERSION.md | awk '{print $1}')
|
WORD_COUNT=$(wc -w release-note-v$NEW_VERSION.md | awk '{print $1}')
|
||||||
if [[ $WORD_COUNT -lt 4 ]]; then
|
if [[ $WORD_COUNT -lt 4 ]]; then
|
||||||
STATUS=1
|
STATUS=1
|
||||||
fi
|
fi
|
||||||
if [ $STATUS = 1 ]; then
|
if [ $STATUS = 1 ]; then
|
||||||
echo "- :no_entry_sign: 'Unreleased' section in CHANGELOG.md is empty" >> $GITHUB_STEP_SUMMARY
|
echo "- :no_entry_sign: 'Unreleased' section in CHANGELOG.md is empty" >> $GITHUB_STEP_SUMMARY
|
||||||
echo ":warning: Please provide a meaningful CHANGELOG.md for the new version $VERSION." >> $GITHUB_STEP_SUMMARY
|
echo ":warning: Please provide a meaningful CHANGELOG.md for the new version $NEW_VERSION." >> $GITHUB_STEP_SUMMA
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "- 'Unreleased' section in CHANGELOG.md has content :white_check_mark:" >> $GITHUB_STEP_SUMMARY
|
echo "- 'Unreleased' section in CHANGELOG.md has content :white_check_mark:" >> $GITHUB_STEP_SUMMARY
|
||||||
|
@ -133,7 +133,7 @@ jobs:
|
||||||
## =================================
|
## =================================
|
||||||
## remove empty lines from top and bottom
|
## remove empty lines from top and bottom
|
||||||
## ---------------------------------
|
## ---------------------------------
|
||||||
sed -i -- -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba' -e '}' release-note-v$VERSION.md
|
sed -i -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba' -e '}' release-note-v$NEW_VERSION.md
|
||||||
|
|
||||||
# 3. create release archive
|
# 3. create release archive
|
||||||
- name: "create release archive"
|
- name: "create release archive"
|
||||||
|
|
Loading…
Reference in New Issue