Skip to content
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
48 changes: 21 additions & 27 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Bump version and push tag
- name: Bump version and create tag
id: semanticversion
uses: hennejg/github-tag-action@v4.1.jh5
uses: mathieudutour/github-tag-action@v6.2
with:
release_branches: master
github_token: ${{ secrets.GITHUB_TOKEN }}

fetch_all_tags: true

- name: Verify and print new build number
run: |
if echo '${{ steps.semanticversion.outputs.new_tag }}' |grep -Eq '^v[0-9]+[.][0-9]+[.][0-9]+$'; then
Expand All @@ -32,21 +32,13 @@ jobs:
exit -1
fi

## Enable Caching
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

## Configure JDK 11
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 11
java-version: '11'
distribution: 'temurin'
cache: 'maven'

## Build with maven
- name: Prepare maven settings
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -66,12 +58,12 @@ jobs:
## Deploy
- name: Deploy package
env:
GPG_EXECUTABLE: gpg
GPG_SECRET_KEYS: ${{ secrets.LEVIGO_GPG_KEYS }}
GPG_OWNERTRUST: ${{ secrets.LEVIGO_GPG_OWNERTRUST }}
GPG_PASSPHRASE: ${{ secrets.LEVIGO_GPG_PASSPHRASE }}
SONATYPE_USERNAME: ${{ secrets.LEVIGO_SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.LEVIGO_SONATYPE_PASSWORD }}
GPG_EXECUTABLE: gpg
GPG_SECRET_KEYS: ${{ secrets.LEVIGO_GPG_KEYS }}
GPG_OWNERTRUST: ${{ secrets.LEVIGO_GPG_OWNERTRUST }}
GPG_PASSPHRASE: ${{ secrets.LEVIGO_GPG_PASSPHRASE }}
SONATYPE_USERNAME: ${{ secrets.LEVIGO_SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.LEVIGO_SONATYPE_PASSWORD }}
run: |
echo "$GPG_SECRET_KEYS" | base64 --decode | $GPG_EXECUTABLE --import --no-tty --batch --yes
echo "$GPG_OWNERTRUST" | base64 --decode | $GPG_EXECUTABLE --import-ownertrust --no-tty --batch --yes
Expand All @@ -98,13 +90,15 @@ jobs:
branch: master
github_token: ${{ secrets.GITHUB_TOKEN }}

## Notify Slack
- name: Notify slack
uses: hennejg/slack-build-notifier@v1.1
- name: Notify Developers
uses: 8398a7/action-slack@v3
with:
username: GitHub
icon_emoji: octocat
channel: ci_project
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref
text: Released new version `${{ steps.semanticversion.outputs.new_version }}` of *${{ github.repository }}* to ${{ secrets.REPOSITORY_URL }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()
27 changes: 10 additions & 17 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,30 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

## Enable Caching
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/checkout@v4

## Configure JDK 11
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
cache: maven

## Build with maven
- name: Perform build
run: mvn verify

## Notify Slack
- name: Notify slack
uses: hennejg/slack-build-notifier@v1.1
- name: Notify Developers
uses: 8398a7/action-slack@v3
with:
username: GitHub
icon_emoji: octocat
channel: ci_project
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref
text: ${{ github.workflow }} ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()
6 changes: 3 additions & 3 deletions .maven.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
<servers>
<server>
<!-- Maven Central Deployment -->
<id>ossrh</id>
<id>central</id>
<username>${env.SONATYPE_USERNAME}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>
</servers>

<profiles>
<!-- Profile for ossrh deployment -->
<!-- Profile for central portal deployment -->
<profile>
<id>ossrh</id>
<id>central</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
Expand Down
20 changes: 10 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<licenses>
<license>
<name>BSD 3-Clause License</name>
<url>http://opensource.org/licenses/BSD-3-Clause</url>
<url>https://opensource.org/licenses/BSD-3-Clause</url>
<distribution>repo</distribution>
</license>
</licenses>
Expand All @@ -39,7 +39,7 @@
<developer>
<name>Jörg Henne</name>
<email>hennejg@gmail.com</email>
<organizationUrl>http://levigo.de</organizationUrl>
<organizationUrl>https://levigo.de</organizationUrl>
</developer>
</developers>

Expand All @@ -57,7 +57,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<version>2.22.2</version>
<configuration>
<!-- see: https://stackoverflow.com/questions/53010200/maven-surefire-could-not-find-forkedbooter-class -->
<argLine>-Xmx1024m -Xms1024m -XX:MaxPermSize=512m
Expand All @@ -74,7 +74,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -100,14 +100,14 @@
<plugins>
<!-- To release to Maven central -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>uploaded</waitUntil>
</configuration>
</plugin>

Expand Down