Skip to content

Commit

Permalink
Migrated from Travis to GitHub Actions, migrated to KumuluzEE 4 and J…
Browse files Browse the repository at this point in the history
…ava 11+
  • Loading branch information
urbim committed Dec 1, 2022
1 parent 7a77878 commit 27fd3f5
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 39 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/kumuluzee-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: KumuluzEE CI

on: [push, pull_request]

jobs:
test:
name: Build and test
runs-on: 'ubuntu-latest'

strategy:
matrix:
java-version: ['11', '17', '18']

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Install
run: mvn --show-version --update-snapshots --batch-mode clean install -DskipTests=true

- name: Test
run: mvn --batch-mode test

publish:
name: Publish to OSSRH
runs-on: 'ubuntu-latest'

needs: test
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Restore cache
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Restore GPG keys
env:
GPG_KEY: ${{ secrets.OSSRH_GPG_KEY }}
GPG_PUB: ${{ secrets.OSSRH_GPG_PUB }}
run: 'printf "$GPG_KEY" | base64 --decode > "$GITHUB_WORKSPACE/gpg.key" && printf "$GPG_PUB" | base64 --decode > "$GITHUB_WORKSPACE/gpg.pub" && gpg --batch --import "$GITHUB_WORKSPACE/gpg.pub" "$GITHUB_WORKSPACE/gpg.key"'

- name: Publish to OSSRH
env:
OSSRH_USERNAME: Kumuluz
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
run: mvn --batch-mode source:jar javadoc:jar deploy -Pdeploy -DskipTests=true --settings ./settings.xml;
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Additional resources:
<dependency>
<groupId>com.kumuluz.ee.jcache</groupId>
<artifactId>kumuluzee-jcache-caffeine</artifactId>
<version>1.0.0</version>
<version>${kumuluzee-jcache-caffeine.version}</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion caffeine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>kumuluzee-jcache</artifactId>
<groupId>com.kumuluz.ee.jcache</groupId>
<version>1.1.0-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>kumuluzee-jcache</artifactId>
<groupId>com.kumuluz.ee.jcache</groupId>
<version>1.1.0-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Binary file removed gpg.tar.gz.enc
Binary file not shown.
35 changes: 27 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.kumuluz.ee.jcache</groupId>
<artifactId>kumuluzee-jcache</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<modules>
<module>common</module>
<module>caffeine</module>
Expand All @@ -23,11 +23,11 @@
<url>https://ee.kumuluz.com</url>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<kumuluzee.version>3.6.0</kumuluzee.version>
<kumuluzee.version>4.0.0</kumuluzee.version>

<jcache-api.version>1.1.1</jcache-api.version>
<caffeine.version>2.8.1</caffeine.version>
Expand All @@ -49,10 +49,10 @@

<developers>
<developer>
<name>cen1</name>
<id>cen1</id>
<email>cen.is.imba@gmail.com</email>
<url>https://github.com/cen1</url>
<name>KumuluzEE Development Team</name>
<id>kumuluz</id>
<email>info@kumuluz.com</email>
<url>https://github.com/kumuluz</url>
</developer>
</developers>

Expand All @@ -70,6 +70,19 @@
</snapshotRepository>
</distributionManagement>

<repositories>
<repository>
<id>sonatype-snapshots</id>
<name>OSS Sonatype repo (snapshots)</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -142,6 +155,12 @@
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
Expand Down
2 changes: 0 additions & 2 deletions settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
</activation>
<properties>
<gpg.keyname>8DCC0AFC</gpg.keyname>
<gpg.secretKeyring>~/build/${env.TRAVIS_REPO_SLUG}/gpg.key</gpg.secretKeyring>
<gpg.publicKeyring>~/build/${env.TRAVIS_REPO_SLUG}/gpg.pub</gpg.publicKeyring>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>

Expand Down

0 comments on commit 27fd3f5

Please sign in to comment.