Skip to content

Commit a236e02

Browse files
committed
Complete autopublish setup
1 parent 6e10c20 commit a236e02

File tree

3 files changed

+48
-18
lines changed

3 files changed

+48
-18
lines changed

.travis.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,34 @@ scala:
77
stages:
88
- test
99
- name: release
10-
if: tag =~ ^v
10+
- if: tag =~ ^v
1111

1212
jobs:
1313
include:
1414
- stage: test
15-
before_script:
16-
- wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
17-
- mkdir geckodriver
18-
- tar -xzf geckodriver-v0.24.0-linux64.tar.gz -C geckodriver
19-
- export PATH=$PWD/geckodriver:$PATH
2015
script:
2116
- sbt +test +publishLocal
2217
- cd example && sbt compileStatics
2318
- stage: release
2419
script:
25-
- openssl aes-256-cbc -K $encrypted_f00a6d0a0202_key -iv $encrypted_f00a6d0a0202_iv -in travis/travis.gpg.enc -out travis/travis.gpg -d
20+
- openssl aes-256-cbc -K $encrypted_f00a6d0a0202_key -iv $encrypted_f00a6d0a0202_iv
21+
-in travis/travis.gpg.enc -out travis/travis.gpg -d
2622
- gpg --import travis/travis.gpg
2723
- test $TRAVIS_PULL_REQUEST = "false" && sbt +publishSigned sonatypeBundleRelease
2824

2925
before_cache:
30-
# Cleanup the cached directories to avoid unnecessary cache updates
3126
- rm -fv $HOME/.ivy2/.sbt.ivy.lock
3227
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
3328
- find $HOME/.sbt -name "*.lock" -print -delete
3429

3530
cache:
3631
directories:
37-
- $HOME/.ivy2/cache
38-
- $HOME/.m2
39-
- $HOME/.cache
40-
- $HOME/.sbt
32+
- "$HOME/.ivy2/cache"
33+
- "$HOME/.m2"
34+
- "$HOME/.cache"
35+
- "$HOME/.sbt"
36+
37+
env:
38+
global:
39+
- secure: rG9cHG3au9EUYQSJKHAsMxws3IW/tSxG1Y/xbuW2Ri1JVr6L6c9ig8gYj4Hju5K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NN3Ma56Q4x094ZTvsccjy7pET4FCpNwrFu0aD+HFPerWB/xlr9ILz7sWy99r4eafS+O2eidoQnPIHAHZ+z/k9ExQedKUzTxO/skgrf1FvswrY7cpfnNApOhCSKm8C5NfMB5BC7M7OsYqDIhIwfs/Q3J9gw18F4fa9czpnduVzkpQUGdZ2vtS+oxDGICB7uaxkRq7HudHHElhz4w9qEOIMpTJjICPa38Hr/fKGxpuhKE=

build.sbt

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,46 @@ val commonSettings = Seq(
2727
"-Ycache-plugin-class-loader:last-modified",
2828
"-Ycache-macro-class-loader:last-modified",
2929
),
30+
autoAPIMappings := true,
31+
publishMavenStyle := true,
32+
publishArtifact in Test := false,
33+
pomIncludeRepository := { _ => false },
34+
35+
publishTo := sonatypePublishToBundle.value,
36+
37+
credentials in Global += Credentials(
38+
"Sonatype Nexus Repository Manager",
39+
"oss.sonatype.org",
40+
sys.env.getOrElse("SONATYPE_USERNAME", ""),
41+
sys.env.getOrElse("SONATYPE_PASSWORD", "")
42+
),
43+
44+
pomExtra := {
45+
<url>https://github.com/UdashFramework/scala-js-jquery</url>
46+
<licenses>
47+
<license>
48+
<name>Apache v.2 License</name>
49+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
50+
<distribution>repo</distribution>
51+
</license>
52+
</licenses>
53+
<scm>
54+
<url>git@github.com:UdashFramework/scala-js-jquery.git</url>
55+
<connection>scm:git@github.com:UdashFramework/scala-js-jquery.git</connection>
56+
</scm>
57+
<developers>
58+
<developer>
59+
<id>avsystem</id>
60+
<name>AVSystem</name>
61+
<url>http://www.avsystem.com/</url>
62+
</developer>
63+
</developers>
64+
}
3065
)
3166

3267
val commonJSSettings = Seq(
3368
Test / parallelExecution := false,
3469
Test / scalaJSStage := FastOptStage,
35-
// ScalaJSBundlerPlugin does not work with scalajs-env-selenium:
36-
// https://github.com/scalacenter/scalajs-bundler/issues/89
37-
// Test / jsEnv := new SeleniumJSEnv(browserCapabilities),
3870
scalacOptions += {
3971
val localDir = (ThisBuild / baseDirectory).value.toURI.toString
4072
val githubDir = "https://raw.githubusercontent.com/UdashFramework/scala-js-jquery"

project/plugins.sbt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
logLevel := Level.Warn
22

3-
libraryDependencies += "org.scala-js" %% "scalajs-env-selenium" % "0.3.0"
4-
53
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.1")
64
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.17.0")
75

86
// Deployment configuration
9-
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0")
7+
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
108
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8.1")

0 commit comments

Comments
 (0)