From 333d0b1a1fd9eae536807cad9ea88b497d496cfd Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Wed, 15 Nov 2023 19:50:47 +0100 Subject: [PATCH] chore: update javadoc even for snapshot --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23d6d9110..1bc3effb2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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