Skip to content

Setup CI release #475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release
on:
push:
tags: ["v*"]
jobs:
publish:
runs-on: ubuntu-20.04
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ubuntu-latest probably better

strategy:
matrix:
scalajsversion: ["1.x", "0.6.x"]
env:
SCALAJS_VERSION: "${{ matrix.scalajsversion == '0.6.x' && '0.6.28' || '' }}"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v13
- 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 }}
23 changes: 6 additions & 17 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ ThisBuild / crossScalaVersions := {
ThisBuild / scalaVersion := crossScalaVersions.value.head

val commonSettings = Seq(
version := "1.2.0-SNAPSHOT",
organization := "org.scala-js",
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings")
)

val noPublishSettings = Seq(
publish / skip := true
)

normalizedName := "scalajs-dom"

commonSettings
Expand Down Expand Up @@ -58,21 +61,6 @@ scalacOptions ++= {
else Nil
}

scmInfo := Some(ScmInfo(
url("https://github.com/scala-js/scala-js-dom"),
"scm:git:[email protected]:scala-js/scala-js-dom.git",
Some("scm:git:[email protected]:scala-js/scala-js-dom.git")))

publishMavenStyle := true

publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}

pomExtra := (
<developers>
<developer>
Expand Down Expand Up @@ -115,9 +103,10 @@ lazy val readme = ScalatexReadme(
scalaVersion := "2.12.10",
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings"),
(Compile / resources) += (example / Compile / fullOptJS).value.data
)
).settings(noPublishSettings: _*)

lazy val example = project.
enablePlugins(ScalaJSPlugin).
settings(commonSettings: _*).
settings(noPublishSettings: _*).
dependsOn(root)
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
addSbtPlugin("com.lihaoyi" % "scalatex-sbt-plugin" % "0.3.11")

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.0.0")

addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")