Skip to content

Commit

Permalink
MOD: auto release artifacts (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoJiang authored Jan 20, 2023
1 parent 2ae282c commit d171395
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion publish.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
./gradlew publishAllPublicationsToMavenCentral
getProp(){
grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//'
}
publishVersion=$(getProp VERSION_NAME)
snapshotSuffix='SNAPSHOT'

./gradlew publishAllPublicationsToMavenCentral
if [[ "$publishVersion" != *"$snapshotSuffix"* ]]; then
echo "auto release artifacts of ${publishVersion}"
./gradlew closeAndReleaseRepository
fi

0 comments on commit d171395

Please sign in to comment.