1
1
import sbt ._
2
2
import sbt .Keys ._
3
- import bintray .{ BintrayKeys , BintrayPlugin }
3
+ import sbtrelease . ReleasePlugin . autoImport . releaseVcsSign
4
4
5
- object PublishSettings extends AutoPlugin with BintrayKeys {
5
+ object PublishSettings extends AutoPlugin {
6
6
override def trigger = allRequirements
7
- override def requires = plugins.JvmPlugin && sbtrelease.ReleasePlugin && BintrayPlugin && ProjectSettings
7
+ override def requires = plugins.JvmPlugin && sbtrelease.ReleasePlugin && ProjectSettings
8
8
9
- override def projectSettings = Seq (
9
+ override def projectSettings = Seq (
10
10
publishMavenStyle := true ,
11
+ publishTo := Some (
12
+ if (isSnapshot.value)
13
+ // Resolver.file("file", new File("target/snapshots"))
14
+ " GitHub Package Registry Snapshots" at s " https://maven.pkg.github.com/alstanchev/ ${name.value}"
15
+ else
16
+ " GitHub Package Registry Releases" at s " https://maven.pkg.github.com/alstanchev/ ${name.value}"
17
+ // "GitHub Packages" at s"https://maven.pkg.github.com/alstanchev/${name.value}"
18
+ ),
19
+ credentials += Credentials (
20
+ " GitHub Package Registry" ,
21
+ " maven.pkg.github.com" ,
22
+ sys.env.getOrElse(" USER" , " " ),
23
+ sys.env.getOrElse(" PACKAGES_TOKEN" , " " )
24
+ ),
25
+ releaseVcsSign := true ,
11
26
pomExtraSetting(" pekko-persistence-inmemory" ),
12
- homepageSetting(" pekko-persistence-inmemory" ),
13
- bintrayPackageLabelsSettings(" inmemory" ),
14
- bintrayPackageAttributesSettings(" pekko-persistence-inmemory" )
15
- )
16
-
17
- def pomExtraSetting (name : String ) = pomExtra :=
27
+ homepageSetting(" pekko-persistence-inmemory" )
28
+ )
29
+
30
+ def pomExtraSetting (name : String ) = pomExtra :=
18
31
<scm >
19
- <url >https:// github.com/ dnvriend/ $ {name}</url >
20
- <connection >scm: git@ github.com: alstanchev/ $ {name}.git</connection >
21
- </scm >
22
- <developers >
32
+ <url >https:// github.com/ dnvriend/ $ {name}</url >
33
+ <connection >scm: git@ github.com: alstanchev/ $ {name}.git</connection >
34
+ </scm >
35
+ <developers >
23
36
<developer >
24
- <id >alstanchev</id >
25
- <name >Aleksandar Stanchev </name >
26
- <url >https:// github.com/ alstanchev</url >
37
+ <id >alstanchev</id >
38
+ <name >Aleksandar Stanchev </name >
39
+ <url >https:// github.com/ alstanchev</url >
27
40
</developer >
28
- </developers >
29
-
30
- def homepageSetting (name : String ) =
31
- homepage := Some (url(s " https://github.com/alstanchev/ $name" ))
32
-
33
- def bintrayPackageLabelsSettings (labels : String * ) =
34
- bintrayPackageLabels := Seq (" pekko" , " persistence" ) ++ labels
41
+ </developers >
35
42
36
- def bintrayPackageAttributesSettings (name : String ) = {
37
- bintrayPackageAttributes ~= (_ ++ Map (
38
- " website_url" -> Seq (bintry.Attr .String (s " https://github.com/alstanchev/ $name" )),
39
- " github_repo" -> Seq (bintry.Attr .String (s " https://github.com/alstanchev/ $name.git " )),
40
- " issue_tracker_url" -> Seq (bintry.Attr .String (s " https://github.com/alstanchev/ $name.git/issues/ " ))
41
- ))
42
- }
43
- }
43
+ def homepageSetting (name : String ) =
44
+ homepage := Some (url(s " https://github.com/alstanchev/ $name" ))
45
+ }
0 commit comments