Skip to content

Commit 746bbf0

Browse files
committed
ci: modernized
1 parent f79e1fa commit 746bbf0

File tree

9 files changed

+63
-78
lines changed

9 files changed

+63
-78
lines changed

.github/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-24.04
8+
strategy:
9+
matrix:
10+
include:
11+
- scalaVersion: 2.13
12+
scalaLibraryVersion: 2.13.6
13+
- scalaVersion: 2.12
14+
scalaLibraryVersion: 2.12.14
15+
steps:
16+
- uses: actions/checkout@v5
17+
- name: Set up JDK
18+
uses: actions/setup-java@v5
19+
with:
20+
java-version: 17
21+
distribution: 'temurin'
22+
- name: Grant execute permission for gradlew
23+
run: chmod +x gradlew
24+
- name: Check with Gradle
25+
run: ./gradlew check --info -PscalaVersion=${{ matrix.scalaVersion }} -PscalaLibraryVersion=${{ matrix.scalaLibraryVersion }}

.github/release-drafter.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-24.04
8+
strategy:
9+
matrix:
10+
include:
11+
- scalaVersion: 2.13
12+
scalaLibraryVersion: 2.13.6
13+
- scalaVersion: 2.12
14+
scalaLibraryVersion: 2.12.14
15+
steps:
16+
- uses: actions/checkout@v5
17+
- name: Set up JDK
18+
uses: actions/setup-java@v5
19+
with:
20+
java-version: 17
21+
distribution: 'temurin'
22+
- name: Grant execute permission for gradlew
23+
run: chmod +x gradlew
24+
- name: Check with Gradle
25+
run: ./gradlew check --info -PscalaVersion=${{ matrix.scalaVersion }} -PscalaLibraryVersion=${{ matrix.scalaLibraryVersion }} -Pversion=${{ github.event.release.tag_name }}
26+
- name: Publish with Gradle to Maven Central
27+
run: ./gradlew publish jreleaserDeploy --info -Pversion=${{ github.event.release.tag_name }} -PscalaVersion=${{ matrix.scalaVersion }} -PscalaLibraryVersion=${{ matrix.scalaLibraryVersion }}
28+
env:
29+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
30+
SIGNING_PUBLIC_KEY: ${{ secrets.SIGNING_PUBLIC_KEY }}
31+
JRELEASER_GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSWORD }}
32+
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_USERNAME }}
33+
JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.JRELEASER_MAVENCENTRAL_PASSWORD }}

.github/workflows/ci.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/release-drafter.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

build.gradle

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ buildscript {
55
dependencies {
66
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.9.5'
77
classpath 'com.avast.gradle:gradle-docker-compose-plugin:0.17.12'
8-
classpath 'com.github.ben-manes:gradle-versions-plugin:0.39.0'
98
}
109
}
1110

@@ -28,11 +27,6 @@ allprojects {
2827
group = 'com.avast.clients.rabbitmq'
2928
version = version == 'unspecified' ? 'DEVELOPER-SNAPSHOT' : version
3029
ext {
31-
def scalaVersionEnv = System.getenv("SCALA_VERSION")
32-
33-
scalaVersionFull = scalaVersionEnv != null ? scalaVersionEnv : "2.13.8"
34-
scalaVersion = "${scalaVersionFull}".split("\\.").dropRight(1).join(".")
35-
3630
bytesVersion = "2.2.0"
3731
circeVersion = "0.14.1"
3832
catsVersion = "2.7.0"
@@ -77,13 +71,12 @@ allprojects {
7771
}
7872
}
7973

80-
println("Scala version: ${scalaVersion} (${scalaVersionFull})") // will display the version once, when configuring root
74+
println("Scala version: ${scalaVersion} (${scalaLibraryVersion})") // will display the version once, when configuring root
8175

8276
subprojects {
8377
apply plugin: 'java'
8478
apply plugin: 'scala'
8579
apply plugin: 'java-library'
86-
apply plugin: 'com.github.ben-manes.versions'
8780

8881
if (!project.hasProperty("notPublished")) {
8982
apply plugin: 'maven-publish'
@@ -163,7 +156,7 @@ subprojects {
163156
}
164157

165158
dependencies {
166-
scalaCompilerPlugin "org.typelevel:kind-projector_$scalaVersionFull:0.13.2"
159+
scalaCompilerPlugin "org.typelevel:kind-projector_$scalaLibraryVersion:0.13.4"
167160

168161
api "org.scala-lang.modules:scala-collection-compat_$scalaVersion:2.6.0"
169162

core/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies {
2929
api "org.typelevel:cats-effect_$scalaVersion:$catsEffectVersion"
3030

3131
api 'org.xbib:jsr-305:1.0.0'
32-
api "org.scala-lang:scala-reflect:$scalaVersionFull"
32+
api "org.scala-lang:scala-reflect:$scalaLibraryVersion"
3333

3434
testImplementation project(":extras")
3535
testImplementation project(":extras-circe")

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
scalaVersion=2.13
2+
scalaLibraryVersion=2.13.17

0 commit comments

Comments
 (0)