Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure sbt-ci-release #7

Merged
merged 4 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: [master, main]
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: 8
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 }}
56 changes: 9 additions & 47 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,20 @@ sbtPlugin := true

enablePlugins(ScriptedPlugin)
scriptedLaunchOpts += s"-Dproject.version=${version.value}"
scriptedDependencies := {
// publish to maven instead of ivy, in order to activate maven profiles on Windows
(Test / compile).value
publishM2.value
}

addSbtPlugin("com.github.sbt" % "sbt-web" % "1.5.5")

libraryDependencies ++= Seq(
"com.aayushatharva.brotli4j" % "brotli4j" % "1.16.0"
)

publishTo := sonatypePublishToBundle.value
pomExtra := {
<url>https://github.com/dwickern/sbt-web-brotli</url>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
<connection>scm:git:git@github.com:dwickern/sbt-web-brotli.git</connection>
<developerConnection>scm:git:git@github.com:dwickern/sbt-web-brotli.git</developerConnection>
<url>https://github.com/dwickern</url>
</scm>
<developers>
<developer>
<id>dwickern</id>
<name>Derek Wickern</name>
<url>https://github.com/dwickern</url>
</developer>
<developer>
<id>enalmada</id>
<name>Adam Lane</name>
<url>https://github.com/enalmada</url>
</developer>
</developers>
}

import ReleaseTransformations._
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
homepage := Some(url("https://github.com/dwickern/sbt-web-brotli"))
licenses := List(License.Apache2)
developers := List(
Developer(
"dwickern",
"Derek Wickern",
"dwickern@gmail.com",
url("https://github.com/dwickern")
)
)
4 changes: 1 addition & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")

libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value
1 change: 0 additions & 1 deletion version.sbt

This file was deleted.

Loading