Tag-based release

This commit is contained in:
Eugene Yokota 2020-12-02 00:00:15 -05:00
parent bd407ae629
commit f5c7156e24
4 changed files with 47 additions and 6 deletions

35
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
env:
# define Java options for both official sbt and sbt-extras
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: "adopt@1.8"
- name: Coursier cache
uses: coursier/cache-action@v5
- name: Test
run: |
sbt test packagedArtifacts
- name: Release
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_PASS: ${{ secrets.BINTRAY_PASS }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
CI_CLEAN: clean
CI_RELEASE: publishSigned
CI_SONATYPE_RELEASE: version
run: |
sbt ci-release

View File

@ -1,17 +1,22 @@
ThisBuild / organization := "com.eed3si9n"
ThisBuild / version := "0.6.1-SNAPSHOT"
ThisBuild / dynverSonatypeSnapshots := true
ThisBuild / version := {
val orig = (ThisBuild / version).value
if (orig.endsWith("-SNAPSHOT")) "0.7.0-SNAPSHOT"
else orig
}
ThisBuild / description := "sbt plugin to define project matrix for cross building"
ThisBuild / licenses := Seq("MIT License" -> url("https://github.com/sbt/sbt-projectmatrix/blob/master/LICENSE"))
lazy val root = (project in file("."))
.enablePlugins(SbtPlugin)
.settings(
sbtPlugin := true,
name := "sbt-projectmatrix",
pluginCrossBuild / sbtVersion := "1.2.8",
scalacOptions := Seq("-deprecation", "-unchecked"),
publishMavenStyle := false,
bintrayOrganization in bintray := None,
bintrayRepository := "sbt-plugins",
publishTo := (bintray / publishTo).value,
scriptedLaunchOpts := { scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
},

View File

@ -1 +1 @@
sbt.version=1.2.8
sbt.version=1.4.4

View File

@ -1,2 +1,3 @@
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")
addSbtPlugin("org.foundweekends" %% "sbt-bintray" % "0.6.1")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.2")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.4")