Skip to content

Commit 9743574

Browse files
committed
setup for maven publish via github action
1 parent d33b5d0 commit 9743574

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

.github/workflows/release.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
on:
3+
push:
4+
branches: main
5+
tags: ["*"]
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Metakit repo
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Checkout Tessellation repo
16+
uses: actions/checkout@v4
17+
with:
18+
repository: Constellation-Labs/tessellation
19+
ref: v2.12.0
20+
path: tessellation
21+
22+
- name: Setup Java, Scala, and SBT
23+
uses: olafurpg/setup-scala@v14
24+
with:
25+
java-version: [email protected]
26+
27+
- name: Build and publish Tessellation artifacts locally
28+
working-directory: tessellation
29+
run: sbt publishLocal
30+
31+
- name: Build and publish Metakit artifacts to Maven
32+
run: sbt ci-release
33+
env:
34+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
35+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
36+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
37+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

build.sbt

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@ import Dependencies.*
22
import sbt.*
33
import sbt.Keys.*
44

5-
ThisBuild / version := "0.1.0"
65
ThisBuild / organization := "io.constellationnetwork"
6+
ThisBuild / homepage := Some(url("https://github.com/Constellation-Labs/metakit"))
7+
ThisBuild / licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
8+
9+
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
10+
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
11+
712
ThisBuild / scalaVersion := "2.13.15"
813
ThisBuild / evictionErrorLevel := Level.Warn
914
ThisBuild / scalafixDependencies += Libraries.organizeImports

project/plugins.sbt

+1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0")
99
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
1010
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")
1111
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.3")
12+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.9.0")
1213

1314
addDependencyTreePlugin

0 commit comments

Comments
 (0)