Skip to content

Commit

Permalink
Use GitHub Actions for publish artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
ihostage committed Oct 21, 2021
1 parent a662093 commit ebf01f4
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 43 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish

on:
push:
branches:
- master
tags: ["*"]

jobs:
publish:
name: Publish / Artifacts
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves
fetch-depth: 0

- name: Set up JDK 8
uses: olafurpg/setup-scala@v13
with:
java-version: [email protected]

- 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 }}
2 changes: 0 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ lazy val root = project

lazy val client = project
.in(file("client"))
.enablePlugins(PublishLibrary)
.settings(
name := "play-soap-client",
description := "play-soap client",
Expand All @@ -28,7 +27,6 @@ lazy val client = project
lazy val plugin = project
.in(file("sbt-plugin"))
.enablePlugins(SbtPlugin)
.enablePlugins(PublishSbtPlugin)
.settings(
name := "sbt-play-soap",
organization := "com.typesafe.sbt",
Expand Down
20 changes: 10 additions & 10 deletions docs/docs.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ libraryDependencies ++= Seq(

resolvers += Resolver.typesafeRepo("releases")

sources in generateDocs := (baseDirectory.value * "*.md").get
target in generateDocs := WebKeys.webTarget.value / "docs"
generateDocs / sources := (baseDirectory.value * "*.md").get
generateDocs / target := WebKeys.webTarget.value / "docs"

lazy val generateDocs = TaskKey[Seq[File]]("generateDocs")

generateDocs := {
val outdir = (target in generateDocs).value
val classpath = (fullClasspath in Compile).value
val scalaRun = (runner in run).value
val outdir = (generateDocs / target).value
val classpath = (Compile / fullClasspath).value
val scalaRun = (run / runner).value
val log = streams.value.log
val baseDir = baseDirectory.value

val markdownFiles = (sources in generateDocs).value
val markdownFiles = (generateDocs / sources).value

// Clear the output directory first
IO.delete(outdir)
Expand All @@ -40,14 +40,14 @@ generateDocs := {
(outdir * "*.html").get
}

resourceGenerators in Assets += generateDocs.taskValue
managedResourceDirectories in Assets += (target in generateDocs).value
Assets / resourceGenerators += generateDocs.taskValue
Assets / managedResourceDirectories += (generateDocs / target).value

// This removes a circular dependency
WebKeys.exportedMappings in Assets := Nil
Assets / WebKeys.exportedMappings := Nil

LessKeys.compress := true

pipelineStages := Seq(uglify)

watchSources ++= (sources in generateDocs).value
watchSources ++= (generateDocs / sources).value
30 changes: 0 additions & 30 deletions project/Publish.scala

This file was deleted.

4 changes: 3 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3")
addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.6.1")
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.6.1")

// Releasing
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")

// Used for generating docs
addSbtPlugin("com.typesafe.sbt" %% "sbt-twirl" % "1.5.1")
Expand Down

0 comments on commit ebf01f4

Please sign in to comment.