Skip to content

Commit

Permalink
Switch to github for publishing (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-vovk authored Jul 3, 2024
1 parent c3ddc8f commit 7a95d2d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 26 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches: [main]
tags: ["v*"]

jobs:
publish:
runs-on: ubuntu-latest
Expand All @@ -15,9 +16,6 @@ jobs:
java-version: '21'
distribution: 'temurin'
cache: 'sbt'
- run: sbt ci-release
- run: sbt publish
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PUBLISH }}
8 changes: 7 additions & 1 deletion .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [ "main" ]

permissions:
contents: read
packages: write

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -22,4 +26,6 @@ jobs:
cache: 'sbt'

- name: Run tests
run: sbt test
run: sbt test
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PUBLISH }}
23 changes: 5 additions & 18 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
import xerial.sbt.Sonatype.sonatypeCentralHost

name := "cats-effect-simple-di"

scalaVersion := "3.3.3"
scalacOptions ++= Seq("-unchecked", "-feature", "-deprecation", "-Xfatal-warnings", "-Wunused:imports")

inThisBuild(List(
organization := "io.github.igor-vovk",
homepage := Some(url("https://github.com/igor-vovk/cats-effect-simple-di")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
developers := List(
Developer(
"igor-vovk",
"Ihor Vovk",
"[email protected]",
url("https://github.com/igor-vovk")
)
)
))
organization := "io.github.igor-vovk"
name := "cats-effect-simple-di"
versionScheme := Some("early-semver")

ThisBuild / sonatypeCredentialHost := sonatypeCentralHost
githubOwner := "igor-vovk"
githubRepository := "cats-effect-simple-di"

lazy val Versions = new {
val catsEffect = "3.5.4"
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.11.0")
addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.0.1")
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")

0 comments on commit 7a95d2d

Please sign in to comment.