2021-11-13 02:55:54 +00:00
#!/usr/bin/env bash
set -ex
TAG = "snapshot"
2021-11-23 19:28:25 +00:00
DATE_TIME_UTC = $( date -u +"%F at %T (UTC)" )
2021-11-13 02:55:54 +00:00
gh release delete " ${ TAG } " -y || true
git tag --force " ${ TAG } "
git push --force origin " ${ TAG } "
mv plantuml.jar plantuml-SNAPSHOT.jar
mv plantuml-javadoc.jar plantuml-SNAPSHOT-javadoc.jar
mv plantuml-sources.jar plantuml-SNAPSHOT-sources.jar
2021-11-23 19:28:25 +00:00
echo -n " ${ DATE_TIME_UTC } " > plantuml-SNAPSHOT-timestamp.lock
2021-11-13 02:55:54 +00:00
cat <<-EOF >notes.txt
2021-11-23 19:28:25 +00:00
This is a pre-release of [ the latest development work] ( https://github.com/plantuml/plantuml/commits/) .
2021-11-13 02:55:54 +00:00
⚠️ **It is not ready for general use** ⚠️
2021-11-23 19:28:25 +00:00
⏱ _Snapshot taken the ${ DATE_TIME_UTC } _
2021-11-13 02:55:54 +00:00
EOF
2021-11-13 09:23:35 +00:00
gh release create --prerelease --target " ${ GITHUB_SHA } " --title " ${ TAG } " --notes-file notes.txt " ${ TAG } " \
2021-11-13 02:55:54 +00:00
plantuml-SNAPSHOT.jar \
plantuml-SNAPSHOT-javadoc.jar \
2021-11-23 19:28:25 +00:00
plantuml-SNAPSHOT-sources.jar \
plantuml-SNAPSHOT-timestamp.lock
2021-11-13 02:55:54 +00:00
2021-11-23 19:28:25 +00:00
echo " ::notice title=release snapshot::Snapshot released at ${ GITHUB_SERVER_URL } / ${ GITHUB_REPOSITORY } /releases/tag/ ${ TAG } and taken the ${ DATE_TIME_UTC } "