chore: update javadoc even for snapshot

This commit is contained in:
Arnaud Roques 2023-11-15 19:50:47 +01:00
parent 135604e727
commit 333d0b1a1f
1 changed files with 8 additions and 2 deletions

View File

@ -26,6 +26,7 @@ jobs:
do_release: ${{ steps.config.outputs.do_release }}
do_snapshot_release: ${{ steps.config.outputs.do_snapshot_release }}
pom_version: ${{ steps.config.outputs.pom_version }}
do_javadoc: ${{ steps.config.outputs.do_javadoc }}
do_test_linux: ${{ steps.config.outputs.do_test_linux }}
do_test_windows: ${{ steps.config.outputs.do_test_windows }}
steps:
@ -53,7 +54,6 @@ jobs:
# Do a release when a git tag starting with 'v' has been created by a suitable user.
# (We match against github.repository_owner as a kludge so that forked repos can release themselves when testing the workflow)
if [[ "${GITHUB_EVENT_NAME}" == "create" && "${REF_TYPE}" == "tag" && "${REF}" == v* && \
( "${ACTOR}" == "arnaudroques" || "${ACTOR}" == "${GITHUB_REPOSITORY_OWNER}" ) \
]]; then
@ -61,6 +61,8 @@ jobs:
echo "do_release=true" >> $GITHUB_OUTPUT
echo "pom_version=${REF#v}"
echo "pom_version=${REF#v}" >> $GITHUB_OUTPUT # pom_version is the tag without the 'v' prefix
echo "do_javadoc=true" >> $GITHUB_OUTPUT
echo "This run will update the Javadoc"
elif [[ "${GITHUB_EVENT_NAME}" =~ push|workflow_dispatch && "${REF}" == "refs/heads/master" && "${ACTOR}" == "arnaudroques" ]]; then
echo "::notice title=::This run will release a snapshot"
@ -68,9 +70,13 @@ jobs:
V=$(perl -ne 'if (/return (\d{6,7});/) {$v=$1} if (/final int beta = (\d+);/) {$b=$1} END{print(substr($v, 0, 1),".", substr($v, 1, 4),"."); if ($b) {print(int(substr($v+1, 5)), "beta", $b);} else {print(int(substr($v, 5)))}}' src/net/sourceforge/plantuml/version/Version.java)
echo "pom_version=$V-SNAPSHOT"
echo "pom_version=$V-SNAPSHOT" >> $GITHUB_OUTPUT # pom_version is taken from Version.java
echo "do_javadoc=true" >> $GITHUB_OUTPUT
echo "This run will update the Javadoc"
else
echo "This run will NOT make a release"
echo "do_javadoc=false" >> $GITHUB_OUTPUT
echo "This run will NOT update the Javadoc"
fi
echo "do_test_linux=true" >> $GITHUB_OUTPUT
echo "do_test_windows=false" >> $GITHUB_OUTPUT
@ -182,7 +188,7 @@ jobs:
deploy_javadoc:
needs: [ build_artifacts, test_linux ]
if: needs.workflow_config.outputs.do_release == 'true'
if: needs.workflow_config.outputs.do_javadoc == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout the repository