Skip to content
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

Update of release process #265

Merged
merged 2 commits into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
38 changes: 38 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and Test
on:
pull_request:

push:
branches:
- master

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
build-and-test:
runs-on: ubuntu-22.04
timeout-minutes: 15
env:
SBT_OPTS: -Dfile.encoding=UTF-8 -Duser.timezone=UTC
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Cache Coursier
uses: coursier/[email protected]

- name: Setup JDK
uses: coursier/[email protected]
with:
jvm: adoptium:1.17

- name: Build
timeout-minutes: 10
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sbt --client "+clean; +compile; +Test/compile; +coverage; +test; +coverageReport; +coveralls;"
45 changes: 45 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish
on:
push:
tags: ["*"]

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
build-and-test:
runs-on: ubuntu-22.04
timeout-minutes: 15
environment: "Generally Available"
env:
SBT_OPTS: -Dfile.encoding=UTF-8 -Duser.timezone=UTC
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}

- name: Cache Coursier
uses: coursier/[email protected]

- name: Setup JDK
uses: coursier/[email protected]
with:
jvm: adoptium:1.17

- name: Import GPG Key
timeout-minutes: 10
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
run: |
echo $PGP_SECRET | base64 --decode | gpg --batch --import

- name: Test and Publish JARs
timeout-minutes: 10
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
run: |
sbt --client "+test; +publishSigned; sonatypeBundleRelease;"
30 changes: 0 additions & 30 deletions .scalariform.conf

This file was deleted.

67 changes: 0 additions & 67 deletions .travis.yml

This file was deleted.

23 changes: 0 additions & 23 deletions bin/config

This file was deleted.

13 changes: 0 additions & 13 deletions bin/test

This file was deleted.

12 changes: 0 additions & 12 deletions bin/test-code-style

This file was deleted.

46 changes: 12 additions & 34 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import com.jsuereth.sbtpgp.PgpKeys
import sbt.Keys._
import sbt._

Expand All @@ -10,55 +9,34 @@ description := "Redis cache plugin for the Play framework 2"

organization := "com.github.karelcemus"

scalaVersion := "2.13.8"
crossScalaVersions := Seq("2.13.12") //, "3.3.0"

crossScalaVersions := Seq( "2.12.15", scalaVersion.value )
scalaVersion := crossScalaVersions.value.head

playVersion := "2.8.13"

connectorVersion := "1.9.1"

specs2Version := "4.13.2"
playVersion := "2.9.0"

libraryDependencies ++= Seq(
// play framework cache API
"com.typesafe.play" %% "play-cache" % playVersion.value % Provided,
// redis connector
"com.github.karelcemus" %% "rediscala" % connectorVersion.value,
// test framework
"org.specs2" %% "specs2-core" % specs2Version.value % Test,
// with mockito extension
"org.specs2" %% "specs2-mock" % specs2Version.value % Test,
"io.github.rediscala" %% "rediscala" % "1.14.0-akka",
// test framework with mockito extension
"org.specs2" %% "specs2-mock" % "4.20.3" % Test,
// test module for play framework
"com.typesafe.play" %% "play-specs2" % playVersion.value % Test
"com.typesafe.play" %% "play-test" % playVersion.value % Test,
// to run integration tests
"com.dimafeng" %% "testcontainers-scala-core" % "0.41.0" % Test
)

resolvers ++= Seq(
"Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"
)

javacOptions ++= Seq( "-source", "1.8", "-target", "1.8", "-Xlint:unchecked", "-encoding", "UTF-8" )

scalacOptions ++= Seq( "-deprecation", "-feature", "-unchecked" )

homepage := Some( url( "https://github.com/karelcemus/play-redis" ) )

licenses := Seq( "Apache 2" -> url( "https://www.apache.org/licenses/LICENSE-2.0" ) )

vcsScm := "[email protected]:KarelCemus/play-redis.git"

authors := Seq( "Karel Čemus" )
javacOptions ++= Seq("-Xlint:unchecked", "-encoding", "UTF-8")

// Release plugin settings
releaseCrossBuild := true
releaseTagName := ( ThisBuild / version ).value
releasePublishArtifactsAction := PgpKeys.publishSigned.value
scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked")

// Publish settings
publishTo := {
if (isSnapshot.value) Some(Opts.resolver.sonatypeSnapshots)
else Some( Opts.resolver.sonatypeStaging )
}
enablePlugins(CustomReleasePlugin)

// exclude from tests coverage
coverageExcludedFiles := ".*exceptions.*"
Loading