1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-12-23 03:19:06 +00:00

Merge pull request #1165 from plantuml/gliptak-patch-1

Update to remove deprecated set-output in GHA
This commit is contained in:
PlantUML 2022-10-25 09:19:24 +02:00 committed by GitHub
commit b28f8d857f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,14 +56,14 @@ jobs:
( "${ACTOR}" == "arnaudroques" || "${ACTOR}" == "${GITHUB_REPOSITORY_OWNER}" ) \ ( "${ACTOR}" == "arnaudroques" || "${ACTOR}" == "${GITHUB_REPOSITORY_OWNER}" ) \
]]; then ]]; then
echo "::notice title=::This run will release '${REF}'" echo "::notice title=::This run will release '${REF}'"
echo "::set-output name=do_release::true" echo "do_release=true" >> $GITHUB_OUTPUT
echo "::set-output name=pom_version::${REF#v}" # pom_version is the tag without the 'v' prefix echo "pom_version=${REF#v}" >> $GITHUB_OUTPUT # pom_version is the tag without the 'v' prefix
elif [[ "${GITHUB_EVENT_NAME}" =~ push|workflow_dispatch && "${REF}" == "refs/heads/master" ]]; then elif [[ "${GITHUB_EVENT_NAME}" =~ push|workflow_dispatch && "${REF}" == "refs/heads/master" ]]; then
echo "::notice title=::This run will release a snapshot" echo "::notice title=::This run will release a snapshot"
echo "::set-output name=do_snapshot_release::true" echo "do_snapshot_release=true" >> $GITHUB_OUTPUT
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) 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 "::set-output name=pom_version::$V-SNAPSHOT" # pom_version is taken from Version.java echo "pom_version=$V-SNAPSHOT" >> $GITHUB_OUTPUT # pom_version is taken from Version.java
else else
echo "This run will NOT make a release" echo "This run will NOT make a release"