Skip to content

Commit

Permalink
Set up sbt-ci-release (#72)
Browse files Browse the repository at this point in the history
Commits to branch `release`, alongside with any tags, will trigger a release.
  • Loading branch information
natsukagami authored May 14, 2024
1 parent dadad1a commit 34668c7
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release
on:
push:
branches: [release]
tags: ["*"]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: sbt
- run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
12 changes: 9 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@ import scalanative.build._

ThisBuild / scalaVersion := "3.3.3"

publish / skip := true

lazy val root =
crossProject(JVMPlatform, NativePlatform)
.crossType(CrossType.Full)
.in(file("."))
.settings(
Seq(
name := "Gears",
organization := "ch.epfl.lamp",
version := "0.2.0-SNAPSHOT",
versionScheme := Some("early-semver"),
libraryDependencies += "org.scalameta" %%% "munit" % "1.0.0-RC1" % Test,
testFrameworks += new TestFramework("munit.Framework")
testFrameworks += new TestFramework("munit.Framework"),

// publish settings
organization := "ch.epfl.lamp",
homepage := Some(url("https://lampepfl.github.io/gears")),
licenses := List(License.Apache2)
)
)
.jvmSettings(
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")

0 comments on commit 34668c7

Please sign in to comment.