2021-11-13 02:55:54 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
|
2022-03-11 05:42:52 +00:00
|
|
|
POM_VERSION=$(gradle properties -q | grep "version:" | awk '{print $2}')
|
|
|
|
RELEASE_DIR="build/github_release"
|
2021-12-08 01:42:42 +00:00
|
|
|
|
|
|
|
mkdir "${RELEASE_DIR}"
|
|
|
|
|
2022-09-16 19:14:28 +00:00
|
|
|
ln -s "../libs/plantuml-${POM_VERSION}.jar" "${RELEASE_DIR}/plantuml.jar"
|
2022-03-11 05:42:52 +00:00
|
|
|
ln -s "../libs/plantuml-${POM_VERSION}.jar" "${RELEASE_DIR}/plantuml-${POM_VERSION}.jar"
|
|
|
|
ln -s "../libs/plantuml-${POM_VERSION}-javadoc.jar" "${RELEASE_DIR}/plantuml-${POM_VERSION}-javadoc.jar"
|
|
|
|
ln -s "../libs/plantuml-${POM_VERSION}-sources.jar" "${RELEASE_DIR}/plantuml-${POM_VERSION}-sources.jar"
|
|
|
|
ln -s "../libs/plantuml-pdf-${POM_VERSION}.jar" "${RELEASE_DIR}/plantuml-pdf-${POM_VERSION}.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
|
2022-09-16 19:14:28 +00:00
|
|
|
ln -s "../libs/plantuml-${POM_VERSION}.jar.asc" "${RELEASE_DIR}/plantuml.jar.asc"
|
2022-03-11 05:42:52 +00:00
|
|
|
ln -s "../libs/plantuml-${POM_VERSION}.jar.asc" "${RELEASE_DIR}/plantuml-${POM_VERSION}.jar.asc"
|
|
|
|
ln -s "../libs/plantuml-${POM_VERSION}-javadoc.jar.asc" "${RELEASE_DIR}/plantuml-${POM_VERSION}-javadoc.jar.asc"
|
|
|
|
ln -s "../libs/plantuml-${POM_VERSION}-sources.jar.asc" "${RELEASE_DIR}/plantuml-${POM_VERSION}-sources.jar.asc"
|
|
|
|
ln -s "../libs/plantuml-pdf-${POM_VERSION}.jar.asc" "${RELEASE_DIR}/plantuml-pdf-${POM_VERSION}.jar.asc"
|
|
|
|
fi
|
2021-12-08 01:42:42 +00:00
|
|
|
|
|
|
|
gh release create \
|
|
|
|
--target "${GITHUB_SHA}" \
|
|
|
|
--title "${TAG}" \
|
|
|
|
"${TAG}" ${RELEASE_DIR}/*
|
2021-11-13 02:55:54 +00:00
|
|
|
|
|
|
|
echo "::notice title=::Released at ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/releases/tag/${TAG} 🎉"
|