Skip to content

Commit cb09903

Browse files
authored
Merge pull request #3 from Kev-J/add-ci-publish
Publish package from CI
2 parents a42f250 + a19767c commit cb09903

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

.github/workflows/scala.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Scala CI
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
packages: write
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Setup JDK
16+
uses: actions/setup-java@v3
17+
with:
18+
distribution: temurin
19+
java-version: 8
20+
- name: Publish package
21+
run: sbt publish
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build.sbt

+11-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@ val minorChiselVersion = "2"
55
val chiselVersion = majorChiselVersion + "." + minorChiselVersion + ".0"
66

77
scalaVersion := "2.13.12"
8-
version := majorChiselVersion + "." + minorChiselVersion + ".4"
8+
version := majorChiselVersion + "." + minorChiselVersion + ".6"
99
organization := "org.armadeus"
1010

11+
credentials += Credentials(
12+
"GitHub Package Registry",
13+
"maven.pkg.github.com",
14+
"_",
15+
System.getenv("GITHUB_TOKEN")
16+
)
17+
1118
lazy val root = (project in file("."))
1219
.settings(
1320
name := "wbplumbing",
@@ -23,5 +30,7 @@ lazy val root = (project in file("."))
2330
"-Ymacro-annotations",
2431
),
2532
addCompilerPlugin("org.chipsalliance" % "chisel-plugin" % chiselVersion cross CrossVersion.full),
26-
2733
)
34+
35+
publishTo := Some("GitHub Martoni Apache Maven Packages" at "https://maven.pkg.github.com/Martoni/WbPlumbing")
36+
publishMavenStyle := true

0 commit comments

Comments
 (0)