Skip to content

Commit

Permalink
Release artifacts to GitHub instead of Bintray (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwliwanow committed Feb 23, 2021
1 parent aeaee93 commit 32d33a9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
- name: Build
env:
FATAL_WARNINGS: "true"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt clean compile test:compile cq test
- name: Publish
if: ${{ github.ref == 'refs/heads/master' && github.repository == 'shopstic/chopsticks' }}
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_PASS: ${{ secrets.BINTRAY_PASS }}
run: sbt bintray:publish bintrayRelease
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt publish
3 changes: 1 addition & 2 deletions .github/workflows/manual-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@ jobs:
- name: Release
env:
FATAL_WARNINGS: "true"
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_PASS: ${{ secrets.BINTRAY_PASS }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt "release release-version ${{ github.event.inputs.releaseVersion }} next-version ${{ github.event.inputs.nextVersion }} with-defaults"
5 changes: 3 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ ThisBuild / run / fork := true
// TODO Remove this once this issue is resolved https://github.com/zio/izumi-reflect/issues/98
ThisBuild / dependencyOverrides := overrideDeps

ThisBuild / githubOwner := "shopstic"
ThisBuild / githubRepository := "chopsticks"

lazy val integrationTestSettings = inConfig(Build.ITest)(Defaults.testTasks)

lazy val util = Build
Expand Down Expand Up @@ -154,7 +157,6 @@ lazy val sample = Build
dependencyOverrides ++= akkaDiscoveryOverrideDeps,
libraryDependencies ++= janinoDeps ++ pprintDeps,
publish / skip := true,
bintrayRelease := {},
akkaGrpcCodeGeneratorSettings += "server_power_apis",
scalacOptions ++= Seq(
s"-Wconf:src=${(Compile / sourceManaged).value.getCanonicalPath}/dev/chopsticks/sample/app/proto/.*&cat=deprecation:s"
Expand All @@ -177,7 +179,6 @@ lazy val root = (project in file("."))
.settings(
name := "chopsticks",
publish / skip := true,
bintrayRelease := {},
dependencyUpdatesFilter -= moduleFilter(organization = "org.scala-lang"),
Build.ossPublishSettings
)
Expand Down
9 changes: 1 addition & 8 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,8 @@ object Build {
def ossPublishSettings: Seq[Def.Setting[_]] = {
import sbtrelease.ReleaseStateTransformations._
import sbtrelease.ReleasePlugin.autoImport._
import bintray.BintrayKeys._
Seq(
bintrayRepository := {
if ((version in ThisBuild).value.endsWith("-SNAPSHOT")) "snapshots" else "maven"
},
releaseVersionBump := sbtrelease.Version.Bump.Minor,
bintrayReleaseOnPublish := false,
bintrayVcsUrl := Some("https://github.com/shopstic/chopsticks.git"),
releaseIgnoreUntrackedFiles := true,
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/")),
releaseProcess := Seq(
Expand All @@ -103,8 +97,7 @@ object Build {
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("bintray:publish"),
releaseStepCommandAndRemaining("bintrayRelease"),
releaseStepCommandAndRemaining("publish"),
setNextVersion,
commitNextVersion,
pushChanges
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
resolvers += Resolver.bintrayRepo("akka", "snapshots")

addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.6.1")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
addSbtPlugin("org.wartremover" % "sbt-wartremover" % "2.4.13")
Expand All @@ -13,3 +12,4 @@ libraryDependencies ++= Seq(
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13")
addDependencyTreePlugin
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.2")

0 comments on commit 32d33a9

Please sign in to comment.