Skip to content

Commit b380980

Browse files
committed
v0.5.1
1 parent 579cf20 commit b380980

6 files changed

Lines changed: 40 additions & 24 deletions

File tree

.github/workflows/publish-release-scala.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,19 @@ jobs:
1515
with:
1616
java-version: 21
1717
distribution: 'temurin'
18-
- run: ./sbt ci-release
18+
- run: ./sbt ci-publish
1919
env:
20-
PGP_PASSPHRASE: ${{ secrets.SIGNING_KEY_PASSWORD }}
21-
PGP_SECRET: ${{ secrets.SIGNING_KEY }}
20+
# For gradle
21+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }}
22+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }}
23+
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GRADLE_SIGNING_KEY_ID }}
24+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GRADLE_SIGNING_KEY_PASSWORD }}
25+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GRADLE_SIGNING_KEY }}
26+
# For sbt
27+
PGP_KEY_ID: ${{ secrets.SBT_PGP_KEY_ID }}
28+
PGP_PASSPHRASE: ${{ secrets.SBT_PGP_PASSPHRASE }}
29+
PGP_SECRET: ${{ secrets.SBT_PGP_SECRET }}
30+
# SBT_PGP_USE_GPG: false
2231
SONATYPE_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
2332
SONATYPE_USERNAME: ${{ secrets.MAVEN_USERNAME }}
33+
BUILD_RELEASE: true

.github/workflows/publish-release.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@ jobs:
2121
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
2222
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }}
2323
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }}
24-
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
25-
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
26-
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
27-
- run: sbt ci-release
28-
env:
29-
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
30-
PGP_SECRET: ${{ secrets.PGP_SECRET }}
31-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
32-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
24+
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GRADLE_SIGNING_KEY_ID }}
25+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GRADLE_SIGNING_KEY_PASSWORD }}
26+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GRADLE_SIGNING_KEY }}
27+

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Supported database systems:
2727
### Documentation
2828

2929
- [Java Usage Guide](./docs/java-usage-guide.md)
30-
- [Javadoc](https://javadoc.io/doc/org.funfix/delayedqueue-jvm/0.4.0/org/funfix/tasks/jvm/package-summary.html)
30+
- [Javadoc](https://javadoc.io/doc/org.funfix/delayedqueue-jvm/0.5.1/org/funfix/tasks/jvm/package-summary.html)
3131
- [Internals](./docs/internals.md)
3232

3333
---
@@ -37,20 +37,20 @@ Maven:
3737
<dependency>
3838
<groupId>org.funfix</groupId>
3939
<artifactId>delayedqueue-jvm</artifactId>
40-
<version>0.4.0</version>
40+
<version>0.5.1</version>
4141
</dependency>
4242
```
4343

4444
Gradle:
4545
```kotlin
4646
dependencies {
47-
implementation("org.funfix:delayedqueue-jvm:0.4.0")
47+
implementation("org.funfix:delayedqueue-jvm:0.5.1")
4848
}
4949
```
5050

5151
sbt:
5252
```scala
53-
libraryDependencies += "org.funfix" % "delayedqueue-jvm" % "0.4.0"
53+
libraryDependencies += "org.funfix" % "delayedqueue-jvm" % "0.5.1"
5454
```
5555

5656
You will need to add a supported JDBC driver:

build.sbt

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import java.io.FileInputStream
22
import java.util.Properties
33
import sbt.ThisBuild
4+
import scala.sys.process.Process
5+
import xerial.sbt.Sonatype.sonatypeCentralHost
46

57
val scala3Version = "3.3.7"
68
val scala2Version = "2.13.18"
@@ -15,6 +17,9 @@ inThisBuild(
1517
Seq(
1618
organization := "org.funfix",
1719
scalaVersion := scala2Version,
20+
// Configure for Sonatype Central Portal
21+
sonatypeCredentialHost := sonatypeCentralHost,
22+
usePgpKeyHex(sys.env.get("PGP_KEY_ID").getOrElse("")),
1823
// ---
1924
// Settings for dealing with the local Gradle-assembled artifacts
2025
// Also see: publishLocalGradleDependencies
@@ -35,7 +40,8 @@ inThisBuild(
3540
.orElse(Option(System.getProperty("buildRelease")))
3641
.exists(it => it == "true" || it == "1" || it == "yes" || it == "on")
3742
if (isRelease) base else s"$base-SNAPSHOT"
38-
}
43+
},
44+
versionScheme := Some("early-semver")
3945
)
4046
)
4147

@@ -101,7 +107,7 @@ val sharedSettings = Seq(
101107
publishTo := {
102108
val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
103109
if (version.value.endsWith("-SNAPSHOT")) Some("central-snapshots".at(centralSnapshots))
104-
else localStaging.value
110+
else sonatypePublishToBundle.value
105111
},
106112

107113
// ScalaDoc settings
@@ -130,10 +136,14 @@ lazy val root = project
130136
publishLocalGradleDependencies := {
131137
import scala.sys.process.*
132138
val rootDir = (ThisBuild / baseDirectory).value
133-
val command = Process(
134-
"./gradlew" :: "publishToMavenLocal" :: Nil,
135-
rootDir
136-
)
139+
val commandArgs =
140+
List(
141+
List("./gradlew"),
142+
if (!version.value.endsWith("-SNAPSHOT")) List("-PbuildRelease=true") else Nil,
143+
List("publishToMavenLocal")
144+
).flatten
145+
146+
val command = Process(commandArgs, rootDir)
137147
val log = streams.value.log
138148
val exitCode = command ! log
139149
if (exitCode != 0) {
@@ -174,5 +184,5 @@ addCommandAlias(
174184
)
175185
addCommandAlias(
176186
"ci-publish",
177-
";publishLocalGradleDependencies; +Test/compile; +publishSigned; sonaUpload"
187+
";publishLocalGradleDependencies; +Test/compile; +publishSigned; sonatypeBundleUpload"
178188
)

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# TO BE modified whenever a new version is released
2-
project.version=0.4.0
2+
project.version=0.5.1
33

44
# Project configuration
55
org.gradle.parallel=true

project/plugins.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.6")
22
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2")
33
addSbtPlugin("org.wartremover" % "sbt-wartremover" % "3.5.5")
44
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1")
5+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2")
56

67
// https://github.com/typelevel/sbt-tpolecat/issues/291
78
libraryDependencies += "org.typelevel" %% "scalac-options" % "0.1.9"

0 commit comments

Comments
 (0)