Skip to content

Commit 34668c7

Browse files
authored
Set up sbt-ci-release (#72)
Commits to branch `release`, alongside with any tags, will trigger a release.
1 parent dadad1a commit 34668c7

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release
2+
on:
3+
push:
4+
branches: [release]
5+
tags: ["*"]
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
- uses: actions/setup-java@v4
14+
with:
15+
distribution: temurin
16+
java-version: 21
17+
cache: sbt
18+
- run: sbt ci-release
19+
env:
20+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
21+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
22+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
23+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

build.sbt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,23 @@ import scalanative.build._
33

44
ThisBuild / scalaVersion := "3.3.3"
55

6+
publish / skip := true
7+
68
lazy val root =
79
crossProject(JVMPlatform, NativePlatform)
810
.crossType(CrossType.Full)
911
.in(file("."))
1012
.settings(
1113
Seq(
1214
name := "Gears",
13-
organization := "ch.epfl.lamp",
14-
version := "0.2.0-SNAPSHOT",
15+
versionScheme := Some("early-semver"),
1516
libraryDependencies += "org.scalameta" %%% "munit" % "1.0.0-RC1" % Test,
16-
testFrameworks += new TestFramework("munit.Framework")
17+
testFrameworks += new TestFramework("munit.Framework"),
18+
19+
// publish settings
20+
organization := "ch.epfl.lamp",
21+
homepage := Some(url("https://lampepfl.github.io/gears")),
22+
licenses := List(License.Apache2)
1723
)
1824
)
1925
.jvmSettings(

project/plugins.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")
22
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.1")
33
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
4+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")

0 commit comments

Comments
 (0)