Skip to content

Commit

Permalink
setup for maven publish via github action
Browse files Browse the repository at this point in the history
  • Loading branch information
scasplte2 committed Dec 18, 2024
1 parent d33b5d0 commit a44ff9f
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release
on:
push:
branches: main
tags: ["*"]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Metakit repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Checkout Tessellation repo
uses: actions/checkout@v4
with:
repository: Constellation-Labs/tessellation
ref: v2.12.0
path: tessellation

- name: Setup Java, Scala, and SBT
uses: olafurpg/setup-scala@v14
with:
java-version: [email protected]

- name: Build and publish Tessellation artifacts locally
working-directory: tessellation
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: sbt publishLocal

- name: Build and publish Metakit artifacts to Maven
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 }}
7 changes: 6 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ import Dependencies.*
import sbt.*
import sbt.Keys.*

ThisBuild / version := "0.1.0"
ThisBuild / organization := "io.constellationnetwork"
ThisBuild / homepage := Some(url("https://github.com/Constellation-Labs/metakit"))
ThisBuild / licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))

ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"

ThisBuild / scalaVersion := "2.13.15"
ThisBuild / evictionErrorLevel := Level.Warn
ThisBuild / scalafixDependencies += Libraries.organizeImports
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.3")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.9.0")

addDependencyTreePlugin

0 comments on commit a44ff9f

Please sign in to comment.