From 00f147e5cb20ee5d16742f1411abc05d1116aaac Mon Sep 17 00:00:00 2001 From: Martin Scheidt Date: Fri, 30 Dec 2022 19:14:26 +0100 Subject: [PATCH] improved and fixed actions --- .github/workflows/CI.yml | 2 ++ .github/workflows/debug.yml | 15 +++++++-------- .github/workflows/release.yml | 12 ++++++------ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 70528a0..2169613 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,6 +17,7 @@ on: - '.github/workflows/release.yml' - '.github/workflows/TagBot.yml' - '.github/zenodo/*' + - 'docs' pull_request: branches: [ main, development ] paths-ignore: @@ -34,6 +35,7 @@ on: - '.github/workflows/release.yml' - '.github/workflows/TagBot.yml' - '.github/zenodo/*' + - 'docs' workflow_dispatch: concurrency: diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index 13332f1..f670203 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -15,20 +15,19 @@ jobs: debug: name: "debug" - outputs: runs-on: ubuntu-latest steps: - name: "checkout" # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it uses: actions/checkout@v3 - # ## opening a debug console - # - name: Setup upterm session - # env: - # ZENODO_SANDBOX_ACCESS_TOKEN: ${{ secrets.ZENODO_SANDBOX_ACCESS_TOKEN }} - # uses: lhotari/action-upterm@v1 - # with: - # limit-access-to-actor: true + ## opening a debug console + - name: Setup upterm session + env: + ZENODO_SANDBOX_ACCESS_TOKEN: ${{ secrets.ZENODO_SANDBOX_ACCESS_TOKEN }} + uses: lhotari/action-upterm@v1 + with: + limit-access-to-actor: true # debug1: # name: "debug 1" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9670fab..d203599 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -106,7 +106,7 @@ jobs: # 2. create release note - name: "create release note" run: | - VERSION=${{ needs.version.outputs.new }} + NEW_VERSION=${{ needs.version.outputs.new }} CURRENT_VERSION=${{ needs.version.outputs.current }} STATUS=0 ## ================================= @@ -114,18 +114,18 @@ jobs: ## --------------------------------- TOP=$(grep -n "## \[Unreleased\]" 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 - sed -i -- "s/###/##/g" 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$NEW_VERSION.md ## ================================= ## 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 STATUS=1 fi if [ $STATUS = 1 ]; then 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_SUMMARY exit 1 else 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 ## --------------------------------- - 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 - name: "create release archive"