Skip to content

Commit 3dfe6e0

Browse files
ci: configure release
* ci: configure release * ci: add package.json * ci: add some release related stuff * ci: add release stuff * ci: add release stuff * ci: add release stuff
1 parent cefd7a3 commit 3dfe6e0

File tree

9 files changed

+126
-10
lines changed

9 files changed

+126
-10
lines changed

.github/workflows/CI.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
run: sbt test
2121
# - name: Run BDD
2222
# run: sbt cucumber
23-
websites_test:
23+
test_website_generation:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout
@@ -30,3 +30,25 @@ jobs:
3030
cd docs
3131
npm install
3232
npm run build
33+
release:
34+
needs:
35+
- test
36+
- test_website_generation
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout
40+
uses: danysk/[email protected]
41+
- uses: olafurpg/setup-scala@v14
42+
with:
43+
java-version: [email protected]
44+
- name: Install Semantic Release
45+
run: |
46+
npm install
47+
npx semantic-release
48+
id: release
49+
env:
50+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
51+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
52+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
53+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
54+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

.idea/misc.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules/Prolog-as-ScalaDSL-build.iml

Lines changed: 46 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules/Prolog-as-ScalaDSL.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.sbt

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ import Dependecies.*
22

33
ThisBuild / scalaVersion := "3.3.1"
44
ThisBuild / organization := "io.github.kelvindev15"
5+
ThisBuild / description := "A DSL written in scala to write Prolog programs"
6+
7+
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
8+
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
9+
ThisBuild / publishMavenStyle := true
510

611
// enablePlugins(CucumberPlugin)
712
// CucumberPlugin.glues := List("example.scenarios")
@@ -20,12 +25,28 @@ scalacOptions ++= Seq("Null").map(wart =>
2025

2126
Compile / doc / target := baseDirectory.value / "api"
2227

23-
lazy val hello = (project in file("."))
28+
assembly / assemblyMergeStrategy := {
29+
case PathList("META-INF", _*) => MergeStrategy.discard
30+
case _ => MergeStrategy.first
31+
}
32+
33+
lazy val PaSDSL = (project in file("."))
2434
.settings(
2535
name := "Prolog-as-ScalaDSL",
2636
scalaVersion := "3.3.1",
2737
libraryDependencies ++= scalaTestBundle,
2838
libraryDependencies ++= cucumberBundle,
2939
libraryDependencies += scalaTestJUnit5,
3040
libraryDependencies += tuProlog,
41+
Compile / mainClass := Some("io.github.kelvindev15.prolog.Application"),
42+
homepage := Some(url("https://github.com/kelvindev15/PPS-22-Prolog-as-scalaDSL")),
43+
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
44+
developers := List(
45+
Developer(
46+
"kelvin-olaiya",
47+
"Kelvin Olaiya",
48+
49+
url("https://kelvin-olaiya.github.io")
50+
)
51+
)
3152
)

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"devDependencies": {
3+
"semantic-release-preconfigured-conventional-commits": "1.1.78"
4+
},
5+
"engines": {
6+
"node": "20.10"
7+
}
8+
}

project/plugins.sbt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1")
33
addSbtPlugin("com.github.sbt" % "sbt-cpd" % "2.0.0")
44
addSbtPlugin("com.waioeka.sbt" % "cucumber-plugin" % "0.3.1")
55
addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "3.4.0")
6+
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.5")
7+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0")
8+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
9+
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")

release.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
var publishCmd = `
2+
git tag -a -f \${nextRelease.version} \${nextRelease.version} -F CHANGELOG.md
3+
sbt ci-release || exit 3
4+
git push --force origin \${nextRelease.version} || exit 6
5+
`
6+
var config = require('semantic-release-preconfigured-conventional-commits');
7+
config.plugins.push(
8+
["@semantic-release/exec", {
9+
"publishCmd": publishCmd,
10+
}],
11+
["@semantic-release/github", {
12+
"assets": [
13+
{ "path": "target/scala-3.3.1/*.jar" },
14+
]
15+
}],
16+
"@semantic-release/git",
17+
)
18+
module.exports = config
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package io.github.kelvindev15.prolog
2+
3+
object Application extends App:
4+
println("HOLA YA!")

0 commit comments

Comments
 (0)