Skip to content

Commit 7e7c76e

Browse files
authored
Merge pull request #34 from mkurz/upgrades_ubuntu_24.04
Latest sbt and sbt-ci-release + Adjust release workflow
2 parents c87a2fc + 173beab commit 7e7c76e

File tree

13 files changed

+53
-51
lines changed

13 files changed

+53
-51
lines changed

.github/workflows/release.yml

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,47 @@
11
name: Release
2-
on: workflow_dispatch
2+
3+
on:
4+
push:
5+
branches: # Snapshots
6+
- master
7+
tags: ["**"] # Releases
38

49
jobs:
5-
release:
6-
name: Release
7-
runs-on: ubuntu-latest
8-
env:
9-
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
10-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
11-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
10+
publish-artifacts:
11+
name: JDK 8
12+
runs-on: ubuntu-24.04
13+
if: ${{ github.repository_owner == 'sbt' }}
1214
steps:
13-
- uses: actions/checkout@v3
15+
- name: Checkout
16+
uses: actions/checkout@v3
1417
with:
18+
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves
1519
fetch-depth: 0
16-
- uses: actions/setup-java@v3
20+
21+
- name: Coursier Cache
22+
id: coursier-cache
23+
uses: coursier/cache-action@v6
24+
25+
- name: Install Adoptium Temurin OpenJDK
26+
uses: coursier/setup-action@v1
1727
with:
18-
distribution: temurin
19-
java-version: 8.0.372+7
20-
cache: sbt
21-
gpg-private-key: ${{ secrets.PGP_SECRET }}
22-
gpg-passphrase: PGP_PASSPHRASE
23-
- run: git config user.email "[email protected]"
24-
- run: git config user.name "sbt release bot"
25-
- name: Push tag
26-
run: sbt "release with-defaults"
28+
jvm: adoptium:8
29+
30+
- name: Install sbt
31+
uses: sbt/setup-sbt@v1
32+
33+
- name: Publish artifacts
34+
run: sbt ci-release
35+
env:
36+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
37+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
38+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
39+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
40+
41+
- name: Cleanup before cache
42+
shell: bash
43+
run: |
44+
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
45+
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
46+
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
47+
find $HOME/.sbt -name "*.lock" -delete || true

.github/workflows/scala.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ jobs:
1919
distribution: temurin
2020
java-version: 8.0.372+7
2121
cache: sbt
22+
- name: Install sbt
23+
uses: sbt/setup-sbt@v1
2224
- name: Run tests
23-
run: sbt "^ scripted"
25+
run: sbt "^ scripted"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
target
22
project/project
3+
.bsp/

build.sbt

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44

55
// sbt cross build
6-
crossSbtVersions := Seq("1.10.2")
6+
crossSbtVersions := Seq("1.11.1")
77

88
// dependencies
99
val packagerVersion = "1.10.4"
@@ -55,7 +55,6 @@ lazy val `sbt-javaagent` = (project.in(file(".")))
5555
)
5656

5757
// publish settings
58-
publishMavenStyle := true
5958
licenses += "Apache-2.0" -> url(
6059
"http://www.apache.org/licenses/LICENSE-2.0.html"
6160
)
@@ -74,21 +73,3 @@ developers := List(
7473
url("https://github.com/sbt/sbt-javaagent/graphs/contributors")
7574
)
7675
)
77-
publishTo := sonatypePublishTo.value
78-
79-
// release settings
80-
import ReleaseTransformations._
81-
releaseProcess := Seq[ReleaseStep](
82-
checkSnapshotDependencies,
83-
inquireVersions,
84-
runClean,
85-
releaseStepCommandAndRemaining("^ scripted"),
86-
setReleaseVersion,
87-
commitReleaseVersion,
88-
tagRelease,
89-
releaseStepCommandAndRemaining("^ publishSigned"),
90-
releaseStepCommand("sonatypeReleaseAll"),
91-
setNextVersion,
92-
commitNextVersion,
93-
pushChanges
94-
)

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.10.2
1+
sbt.version=1.11.1

project/plugins.sbt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22
* Copyright © 2016-2017 Lightbend, Inc. <http://www.lightbend.com>
33
*/
44

5-
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")
6-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
7-
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
5+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.1")

src/sbt-test/agent/arguments/test.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ TaskKey[Unit]("check") := {
2929

3030
import scala.sys.process._
3131
val output =
32-
((Universal / stagingDirectory).value / "bin" / packageName.value).absolutePath.!!
32+
((Universal / com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport.stagingDirectory).value / "bin" / packageName.value).absolutePath.!!
3333

3434
assert(
3535
!(output contains "Agent 86"),

src/sbt-test/agent/compile/test.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ TaskKey[Unit]("checkLog") := {
1818
TaskKey[Unit]("checkDist") := {
1919
import scala.sys.process._
2020
val output =
21-
((Universal / stagingDirectory).value / "bin" / packageName.value).absolutePath.!!
21+
((Universal / com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport.stagingDirectory).value / "bin" / packageName.value).absolutePath.!!
2222
expect("dist run", output, "Agent 86")
2323
expect("dist run", output, "class maxwell.Maxwell")
2424
}

src/sbt-test/agent/dist/test.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ TaskKey[Unit]("check") := {
88

99
import scala.sys.process._
1010
val output =
11-
((Universal / stagingDirectory).value / "bin" / packageName.value).absolutePath.!!
11+
((Universal / com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport.stagingDirectory).value / "bin" / packageName.value).absolutePath.!!
1212

1313
assert(
1414
output contains "Agent 86",

src/sbt-test/agent/dist_1.9.x/test.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ TaskKey[Unit]("check") := {
88

99
import scala.sys.process._
1010
val output =
11-
((Universal / stagingDirectory).value / "bin" / packageName.value).absolutePath.!!
11+
((Universal / com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport.stagingDirectory).value / "bin" / packageName.value).absolutePath.!!
1212

1313
assert(
1414
output contains "Agent 86",

0 commit comments

Comments
 (0)