Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(shared): add release plugins and semantic-release support (#87)
- Loading branch information
abalias
committed
Oct 26, 2022
1 parent
66a2436
commit 25be1b3
Showing
5 changed files
with
83 additions
and
4 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,38 @@ | ||
import sbtbuildinfo.BuildInfoPlugin | ||
import sbtbuildinfo.BuildInfoPlugin.autoImport._ | ||
import Dependencies._ | ||
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._ | ||
|
||
ThisBuild / version := "0.1.0" | ||
|
||
ThisBuild / scalaVersion := "3.1.3" | ||
inThisBuild( | ||
Seq( | ||
organization := "io.iohk.atala", | ||
scalaVersion := "3.2.0", | ||
fork := true, | ||
run / connectInput := true, | ||
versionScheme := Some("semver-spec"), | ||
githubOwner := "input-output-hk", | ||
githubRepository := "atala-prism-building-blocks", | ||
githubTokenSource := TokenSource.Environment("GITHUB_TOKEN") | ||
) | ||
) | ||
|
||
lazy val root = (project in file(".")) | ||
.settings( | ||
organization := "io.iohk.atala", | ||
organizationName := "Input Output HK", | ||
organizationName := "Input Output Global", | ||
buildInfoPackage := "io.iohk.atala.shared", | ||
name := "shared", | ||
crossPaths := false, | ||
libraryDependencies ++= dependencies | ||
).enablePlugins(BuildInfoPlugin) | ||
|
||
// ### ReleaseStep ### | ||
releaseProcess := Seq[ReleaseStep]( | ||
checkSnapshotDependencies, | ||
inquireVersions, | ||
runClean, | ||
runTest, | ||
setReleaseVersion, | ||
publishArtifacts, | ||
setNextVersion | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"name": "shared", | ||
"devDependencies": { | ||
"@commitlint/cli": "^17.0.3", | ||
"@commitlint/config-conventional": "^17.0.3", | ||
"@semantic-release/changelog": "^6.0.1", | ||
"@semantic-release/exec": "^6.0.3", | ||
"@semantic-release/git": "^10.0.1", | ||
"conventional-changelog-conventionalcommits": "^5.0.0", | ||
"gradle-semantic-release-plugin": "1.7.3", | ||
"husky": "^8.0.1", | ||
"pinst": "^3.0.0", | ||
"prettier": "^2.7.1", | ||
"semantic-release": "^19.0.3", | ||
"semantic-release-monorepo": "^7.0.5" | ||
}, | ||
"extends": "semantic-release-monorepo", | ||
"release": { | ||
"branches": [ | ||
{ | ||
"name": "main" | ||
}, | ||
{ | ||
"name": "prerelease/shared", | ||
"prerelease": "snapshot" | ||
} | ||
], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "sbt \"release release-version ${nextRelease.version} next-version ${nextRelease.version}-SNAPSHOT with-defaults\"" | ||
} | ||
], | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "CHANGELOG.md" | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"version.sbt", | ||
"CHANGELOG.md" | ||
], | ||
"message": "chore(release): cut shared lib ${nextRelease.version} release [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
] | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.1") | ||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") | ||
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") | ||
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ThisBuild / version := "0.1.0-SNAPSHOT" |