File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 11sudo : false
22language : scala
3- matrix :
3+ stages :
4+ - name : test
5+ - name : release
6+ if : (branch = master AND type = push) OR (tag IS present)
7+ jobs :
48 include :
59 - env : CMD="mill __.jvm[2.11.12].test"
610 jdk : oraclejdk8
@@ -26,6 +30,12 @@ matrix:
2630 - env : CMD="mill demo.fullOpt && sbt readme/run"
2731 jdk : oraclejdk8
2832
29- script :
33+ - stage : release
34+ script :
35+ - echo "$PGP_SECRET" | base64 --decode | gpg --import
36+ - mill __.publish --sonatypeCreds "$SONATYPE_USERNAME:$SONATYPE_PASSWORD" --release true --gpgPassphrase "$PGP_PASSPHRASE"
37+
38+ before_install :
3039- curl -L -o ~/bin/mill https://github.com/lihaoyi/mill/releases/download/0.3.6/0.3.6-85-38fce6 && chmod +x ~/bin/mill
40+ script :
3141- $CMD
Original file line number Diff line number Diff line change @@ -151,7 +151,14 @@ trait CommonCrossModule extends CrossScalaModule with PublishModule{
151151 def zincWorker : ZincWorkerModule =
152152 CustomZincWorker
153153
154- def publishVersion = " 2.1.0"
154+ def publishVersion = T {
155+ import sys .process ._
156+ val desc = Seq (" git" , " describe" , " --tags" ).!! .trim.replace(" -g" , " +" )
157+ if (desc.contains(" +" ))
158+ desc + " -SNAPSHOT"
159+ else
160+ desc
161+ }
155162 def artifactName = millModuleSegments.parts.dropRight(2 ).mkString(" -" )
156163 def pomSettings = PomSettings (
157164 description = artifactName(),
You can’t perform that action at this time.
0 commit comments