Unverified Commit 58e903ac authored by Silvano Cerza's avatar Silvano Cerza Committed by GitHub

[skip changelog] Always publish documentation on creation of release branch (#1028)

Previously, release branch creation did not trigger documentation publishing.
Co-authored-by: default avatarper1234 <accounts@perglass.com>
parent 969473d4
......@@ -13,10 +13,31 @@ on:
- "cli/**"
- "rpc/**"
- ".github/workflows/publish-docs.yaml"
# On branch or tag creation (will be filtered by the publish-determination job)
create:
jobs:
publish-determination:
runs-on: ubuntu-latest
outputs:
result: ${{ steps.determination.outputs.result }}
steps:
- name: Determine if documentation should be published on this workflow run
id: determination
run: |
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
if [[ "${{ github.event_name }}" == "push" || ( "${{ github.event_name }}" == "create" && "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX ) ]]; then
RESULT="true"
else
RESULT="false"
fi
echo "::set-output name=result::$RESULT"
publish:
runs-on: ubuntu-latest
needs: publish-determination
if: needs.publish-determination.outputs.result == 'true'
steps:
- name: Checkout
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment