Skip to content

Commit d77ce61

Browse files
committed
use sbt-ci-release. change groupId
1 parent f12fce7 commit d77ce61

File tree

11 files changed

+48
-36
lines changed

11 files changed

+48
-36
lines changed

.github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
os: ubuntu-latest
2626
steps:
2727
- uses: actions/[email protected]
28+
with:
29+
fetch-depth: 0
2830
- uses: olafurpg/setup-scala@v10
2931
with:
3032
java-version: "adopt@1.${{ matrix.java }}"

.github/workflows/release.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release
2+
on:
3+
push:
4+
branches: [master]
5+
tags: ["*"]
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- uses: actions/[email protected]
11+
with:
12+
fetch-depth: 0
13+
- uses: olafurpg/setup-scala@v10
14+
- run: sbt ci-release
15+
env:
16+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
17+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
18+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
19+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
20+
CI_RELEASE: "^ publishSigned"

build.sbt

+19-28
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import sbtrelease.ReleaseStateTransformations._
2-
3-
ThisBuild / organization := "com.github.gseitz"
1+
ThisBuild / organization := "com.github.sbt"
42

53
lazy val protocJar = "com.github.os72" % "protoc-jar" % "3.11.4"
64

@@ -12,38 +10,31 @@ lazy val root = (project in file("."))
1210
libraryDependencies += protocJar
1311
scalacOptions := Seq("-deprecation", "-unchecked", "-Xlint", "-Yno-adapted-args")
1412
(Compile / doc / scalacOptions) ++= {
15-
val tagOrBranch = if(isSnapshot.value) {
16-
sys.process.Process("git rev-parse HEAD").lineStream_!.head
17-
} else {
18-
"v" + version.value
19-
}
13+
val hash = sys.process.Process("git rev-parse HEAD").lineStream_!.head
2014
Seq(
2115
"-sourcepath", baseDirectory.value.getAbsolutePath,
22-
"-doc-source-url", "https://github.com/sbt/sbt-protobuf/blob/" + tagOrBranch + "€{FILE_PATH}.scala"
16+
"-doc-source-url", "https://github.com/sbt/sbt-protobuf/blob/" + hash + "€{FILE_PATH}.scala"
2317
)
2418
}
25-
publishMavenStyle := false
26-
bintrayOrganization := Some("sbt")
27-
bintrayRepository := "sbt-plugin-releases"
28-
bintrayPackage := "sbt-protobuf"
29-
bintrayReleaseOnPublish := false
19+
licenses += (("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0")))
20+
homepage := Some(url("https://github.com/sbt/sbt-protobuf"))
21+
pomExtra := {
22+
<developers>{
23+
Seq(
24+
("xuwei-k", "Kenji Yoshida"),
25+
("eed3si9n", "Eugene Yokota"),
26+
).map { case (id, name) =>
27+
<developer>
28+
<id>{id}</id>
29+
<name>{name}</name>
30+
<url>https://github.com/{id}</url>
31+
</developer>
32+
}
33+
}</developers>
34+
}
3035
scriptedBufferLog := false
3136
scriptedLaunchOpts += s"-Dplugin.version=${version.value}"
3237

3338
// Don't update to 1.3.0 https://github.com/sbt/sbt/issues/5049
3439
crossSbtVersions := Seq("0.13.18", "1.2.8")
35-
releaseProcess := Seq[ReleaseStep](
36-
checkSnapshotDependencies,
37-
inquireVersions,
38-
runClean,
39-
releaseStepCommandAndRemaining("^ test"),
40-
releaseStepCommandAndRemaining("^ scripted"),
41-
setReleaseVersion,
42-
commitReleaseVersion,
43-
tagRelease,
44-
releaseStepCommandAndRemaining("^ publish"),
45-
setNextVersion,
46-
commitNextVersion,
47-
pushChanges
48-
)
4940
})

project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.6.1")
1+
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5")
22
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.0.15")
33
addSbtPlugin("com.eed3si9n" % "sbt-nocomma" % "0.1.0")

src/sbt-test/delete/clear-dir/project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
if(pluginVersion == null)
44
throw new RuntimeException("""|The system property 'plugin.version' is not defined.
55
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
6-
else addSbtPlugin("com.github.gseitz" % "sbt-protobuf" % pluginVersion)
6+
else addSbtPlugin("com.github.sbt" % "sbt-protobuf" % pluginVersion)
77
}

src/sbt-test/delete/single-file/project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
if(pluginVersion == null)
44
throw new RuntimeException("""|The system property 'plugin.version' is not defined.
55
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
6-
else addSbtPlugin("com.github.gseitz" % "sbt-protobuf" % pluginVersion)
6+
else addSbtPlugin("com.github.sbt" % "sbt-protobuf" % pluginVersion)
77
}

src/sbt-test/sbt-protobuf/basic/project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
if(pluginVersion == null)
44
throw new RuntimeException("""|The system property 'plugin.version' is not defined.
55
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
6-
else addSbtPlugin("com.github.gseitz" % "sbt-protobuf" % pluginVersion)
6+
else addSbtPlugin("com.github.sbt" % "sbt-protobuf" % pluginVersion)
77
}

src/sbt-test/sbt-protobuf/multi-project/project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
if(pluginVersion == null)
44
throw new RuntimeException("""|The system property 'plugin.version' is not defined.
55
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
6-
else addSbtPlugin("com.github.gseitz" % "sbt-protobuf" % pluginVersion)
6+
else addSbtPlugin("com.github.sbt" % "sbt-protobuf" % pluginVersion)
77
}

src/sbt-test/sbt-protobuf/protojar/project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
if(pluginVersion == null)
44
throw new RuntimeException("""|The system property 'plugin.version' is not defined.
55
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
6-
else addSbtPlugin("com.github.gseitz" % "sbt-protobuf" % pluginVersion)
6+
else addSbtPlugin("com.github.sbt" % "sbt-protobuf" % pluginVersion)
77
}

src/sbt-test/sbt-protobuf/task-scoped/project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
if(pluginVersion == null)
44
throw new RuntimeException("""|The system property 'plugin.version' is not defined.
55
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
6-
else addSbtPlugin("com.github.gseitz" % "sbt-protobuf" % pluginVersion)
6+
else addSbtPlugin("com.github.sbt" % "sbt-protobuf" % pluginVersion)
77
}

version.sbt

-1
This file was deleted.

0 commit comments

Comments
 (0)