diff --git a/.github/scripts/release-snapshot.sh b/.github/scripts/release-snapshot.sh index da4d0a8df..74f5596ce 100755 --- a/.github/scripts/release-snapshot.sh +++ b/.github/scripts/release-snapshot.sh @@ -2,6 +2,7 @@ set -ex find . -name "*.jar" +find . -name "*.asc" TAG="snapshot" DATE_TIME_UTC=$(date -u +"%F at %T (UTC)") @@ -31,8 +32,6 @@ if [[ -e "build/publications/maven/module.json.asc" ]]; then cp "build/libs/plantuml-${RELEASE_VERSION}-javadoc.jar.asc" "github_release/plantuml-SNAPSHOT-javadoc.jar.asc" cp "build/libs/plantuml-${RELEASE_VERSION}-sources.jar.asc" "github_release/plantuml-SNAPSHOT-sources.jar.asc" cp "build/libs/plantuml-pdf-${RELEASE_VERSION}.jar.asc" "github_release/plantuml-pdf-SNAPSHOT.jar.asc" - ls -l build/libs - ls -l plantuml-mit/build/libs cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}.jar.asc" "github_release/plantuml-mit-SNAPSHOT.jar.asc" cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}-sources.jar.asc" "github_release/plantuml-mit-SNAPSHOT-sources.jar.asc" fi diff --git a/.github/scripts/release.sh b/.github/scripts/release.sh index 96ffbe094..c713160e5 100755 --- a/.github/scripts/release.sh +++ b/.github/scripts/release.sh @@ -1,33 +1,36 @@ #!/usr/bin/env bash set -ex -RELEASE_DIR="build/github_release" +find . -name "*.jar" +find . -name "*.asc" -mkdir "${RELEASE_DIR}" +mkdir "github_release" -ln -s "../libs/plantuml-${RELEASE_VERSION}.jar" "${RELEASE_DIR}/plantuml.jar" -ln -s "../libs/plantuml-${RELEASE_VERSION}.jar" "${RELEASE_DIR}/plantuml-${RELEASE_VERSION}.jar" -ln -s "../libs/plantuml-${RELEASE_VERSION}-javadoc.jar" "${RELEASE_DIR}/plantuml-${RELEASE_VERSION}-javadoc.jar" -ln -s "../libs/plantuml-${RELEASE_VERSION}-sources.jar" "${RELEASE_DIR}/plantuml-${RELEASE_VERSION}-sources.jar" -ln -s "../libs/plantuml-pdf-${RELEASE_VERSION}.jar" "${RELEASE_DIR}/plantuml-pdf-${RELEASE_VERSION}.jar" -#ln -s "../libs/plantuml-linux-amd64-${RELEASE_VERSION}" "${RELEASE_DIR}/plantuml-linux-amd64-${RELEASE_VERSION}" -#ln -s "../libs/plantuml-darwin-amd64-${RELEASE_VERSION}" "${RELEASE_DIR}/plantuml-darwin-amd64-${RELEASE_VERSION}" -#ln -s "../libs/plantuml-win-amd64-${RELEASE_VERSION}.exe" "${RELEASE_DIR}/plantuml-win-amd64-${RELEASE_VERSION}.exe" -#ln -s "../plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}.jar" "${RELEASE_DIR}/plantuml-mit-${RELEASE_VERSION}.jar" -#ln -s "../plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}-sources.jar" "${RELEASE_DIR}/plantuml-mit-${RELEASE_VERSION}-sources.jar" +cp "build/libs/plantuml-${RELEASE_VERSION}.jar" "github_release/plantuml.jar" +cp "build/libs/plantuml-${RELEASE_VERSION}.jar" "github_release/plantuml-${RELEASE_VERSION}.jar" +cp "build/libs/plantuml-${RELEASE_VERSION}-javadoc.jar" "github_release/plantuml-${RELEASE_VERSION}-javadoc.jar" +cp "build/libs/plantuml-${RELEASE_VERSION}-sources.jar" "github_release/plantuml-${RELEASE_VERSION}-sources.jar" +cp "build/libs/plantuml-pdf-${RELEASE_VERSION}.jar" "github_release/plantuml-pdf-${RELEASE_VERSION}.jar" +#cp "build/libs/plantuml-linux-amd64-${RELEASE_VERSION}" "github_release/plantuml-linux-amd64-${RELEASE_VERSION}" +#cp "build/libs/plantuml-darwin-amd64-${RELEASE_VERSION}" "github_release/plantuml-darwin-amd64-${RELEASE_VERSION}" +#cp "build/libs/plantuml-win-amd64-${RELEASE_VERSION}.exe" "github_release/plantuml-win-amd64-${RELEASE_VERSION}.exe" +cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}.jar" "github_release/plantuml-mit-${RELEASE_VERSION}.jar" +cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}-sources.jar" "github_release/plantuml-mit-${RELEASE_VERSION}-sources.jar" if [[ -e "build/publications/maven/module.json.asc" ]]; then # signatures are optional so that forked repos can release snapshots without needing a gpg signing key - ln -s "../libs/plantuml-${RELEASE_VERSION}.jar.asc" "${RELEASE_DIR}/plantuml.jar.asc" - ln -s "../libs/plantuml-${RELEASE_VERSION}.jar.asc" "${RELEASE_DIR}/plantuml-${RELEASE_VERSION}.jar.asc" - ln -s "../libs/plantuml-${RELEASE_VERSION}-javadoc.jar.asc" "${RELEASE_DIR}/plantuml-${RELEASE_VERSION}-javadoc.jar.asc" - ln -s "../libs/plantuml-${RELEASE_VERSION}-sources.jar.asc" "${RELEASE_DIR}/plantuml-${RELEASE_VERSION}-sources.jar.asc" - ln -s "../libs/plantuml-pdf-${RELEASE_VERSION}.jar.asc" "${RELEASE_DIR}/plantuml-pdf-${RELEASE_VERSION}.jar.asc" + cp "build/libs/plantuml-${RELEASE_VERSION}.jar.asc" "github_release/plantuml.jar.asc" + cp "build/libs/plantuml-${RELEASE_VERSION}.jar.asc" "github_release/plantuml-${RELEASE_VERSION}.jar.asc" + cp "build/libs/plantuml-${RELEASE_VERSION}-javadoc.jar.asc" "github_release/plantuml-${RELEASE_VERSION}-javadoc.jar.asc" + cp "build/libs/plantuml-${RELEASE_VERSION}-sources.jar.asc" "github_release/plantuml-${RELEASE_VERSION}-sources.jar.asc" + cp "build/libs/plantuml-pdf-${RELEASE_VERSION}.jar.asc" "github_release/plantuml-pdf-${RELEASE_VERSION}.jar.asc" + cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}.jar.asc" "github_release/plantuml-mit-${RELEASE_VERSION}.jar.asc" + cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}-sources.jar.asc" "github_release/plantuml-mit-${RELEASE_VERSION}-sources.jar.asc" fi gh release create \ --target "${GITHUB_SHA}" \ --title "${TAG}" \ - "${TAG}" ${RELEASE_DIR}/* + "${TAG}" github_release/* echo "::notice title=::Released at ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/releases/tag/${TAG} 🎉" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de3b60a80..6e3c08d73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,7 @@ jobs: else echo "This run will NOT make a release" fi - echo "do_test=false" >> $GITHUB_OUTPUT + echo "do_test=true" >> $GITHUB_OUTPUT # We run the tests on many OS / Java combinations but also the Compile step because some users build # their own jars from source, so it is good for CI to check that is working on all combinations.