Skip to content

Commit 1effb12

Browse files
committed
Initial merge
1 parent 3ae8ddc commit 1effb12

File tree

16 files changed

+476
-23
lines changed

16 files changed

+476
-23
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
*.txt text
4+
*.sh text eol=lf
5+
*.html text eol=lf diff=html
6+
*.css text eol=lf
7+
*.js text eol=lf
8+
*.jpg -text
9+
*.pdf -text
10+
*.java text diff=java

.github/workflows/branch-ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Branch CI
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '.github/workflows/**'
7+
- '*.md'
8+
- '*.txt'
9+
branches-ignore:
10+
- 'release*'
11+
12+
jobs:
13+
build:
14+
name: Branch CI
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/cache@v3
19+
with:
20+
path: ~/.m2/repository
21+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
22+
restore-keys: |
23+
${{ runner.os }}-maven-
24+
- name: Set up JDK
25+
uses: actions/setup-java@v4
26+
with:
27+
java-version: 17
28+
distribution: zulu
29+
server-id: github
30+
server-username: GITHUB_ACTOR
31+
server-password: GITHUB_TOKEN
32+
- name: Maven Build
33+
run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }}
36+
- name: Maven Verify
37+
run: mvn verify -B
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Pre-release CI
2+
3+
on:
4+
release:
5+
types: [ prereleased ]
6+
7+
jobs:
8+
build:
9+
name: Pre-release CI
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/cache@v3
14+
with:
15+
path: ~/.m2/repository
16+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
17+
restore-keys: |
18+
${{ runner.os }}-maven-
19+
- name: Set up Java for publishing to GitHub Packages
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: 17
23+
distribution: zulu
24+
server-id: github
25+
server-username: GITHUB_ACTOR
26+
server-password: GITHUB_TOKEN
27+
- name: Deploy pre-release version to GitHub Packages
28+
run: |
29+
pre_release_version=${{ github.event.release.tag_name }}
30+
echo Pre-release version $pre_release_version
31+
mvn versions:set -DnewVersion=$pre_release_version -DgenerateBackupPoms=false
32+
mvn versions:commit
33+
mvn clean deploy -Pdeploy2Github -B -V
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }}
36+
- name: Set up Java for publishing to Maven Central Repository
37+
uses: actions/setup-java@v4
38+
with:
39+
java-version: 17
40+
distribution: zulu
41+
server-id: central
42+
server-username: MAVEN_USERNAME
43+
server-password: MAVEN_PASSWORD
44+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
45+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
46+
- name: Deploy pre-release version to Maven Central Repository
47+
run: |
48+
pre_release_version=${{ github.event.release.tag_name }}
49+
echo Pre-release version $pre_release_version
50+
mvn versions:set -DnewVersion=$pre_release_version -DgenerateBackupPoms=false
51+
mvn versions:commit
52+
mvn deploy -Pdeploy2Maven -DskipTests -B -V
53+
env:
54+
MAVEN_USERNAME: ${{ secrets.SONATYPE_CENTRAL_USERNAME }}
55+
MAVEN_PASSWORD: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
56+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
57+
- name: Rollback pre-release (remove tag)
58+
if: failure()
59+
run: git push origin :refs/tags/${{ github.event.release.tag_name }}

.github/workflows/release-ci.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Release CI
2+
3+
on:
4+
release:
5+
types: [ released ]
6+
7+
jobs:
8+
build:
9+
name: Release CI
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
- run: git checkout ${{ github.event.release.target_commitish }}
16+
- uses: actions/cache@v3
17+
with:
18+
path: ~/.m2/repository
19+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
20+
restore-keys: |
21+
${{ runner.os }}-maven-
22+
- name: Set up Java for publishing to GitHub Packages
23+
uses: actions/setup-java@v4
24+
with:
25+
java-version: 17
26+
distribution: zulu
27+
server-id: github
28+
server-username: GITHUB_ACTOR
29+
server-password: GITHUB_TOKEN
30+
- name: Maven Build
31+
run: mvn clean install -DskipTests=true -B -V
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }}
34+
- name: Maven Verify
35+
run: mvn verify -B
36+
- name: Configure git
37+
run: |
38+
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
39+
git config --global user.name "${GITHUB_ACTOR}"
40+
- name: Prepare release
41+
id: prepare_release
42+
run: |
43+
mvn -B build-helper:parse-version release:prepare \
44+
-DreleaseVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.incrementalVersion} \
45+
-Darguments="-DskipTests=true"
46+
echo release_tag=$(git describe --tags --abbrev=0) >> $GITHUB_OUTPUT
47+
- name: Perform release to GitHub Packages
48+
run: mvn -B release:perform -Pdeploy2Github -Darguments="-DskipTests=true -Pdeploy2Github"
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }}
52+
- name: Set up Java for publishing to Maven Central Repository
53+
uses: actions/setup-java@v4
54+
with:
55+
java-version: 17
56+
distribution: zulu
57+
server-id: central
58+
server-username: MAVEN_USERNAME
59+
server-password: MAVEN_PASSWORD
60+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
61+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
62+
- name: Deploy release version to Maven Central Repository
63+
run: |
64+
release_version=$(echo ${{ steps.prepare_release.outputs.release_tag }} | sed "s/release-//")
65+
echo release version $release_version
66+
mvn versions:set -DnewVersion=$release_version -DgenerateBackupPoms=false
67+
mvn versions:commit
68+
mvn deploy -Pdeploy2Maven -DskipTests -B -V
69+
env:
70+
MAVEN_USERNAME: ${{ secrets.SONATYPE_CENTRAL_USERNAME }}
71+
MAVEN_PASSWORD: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
72+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
73+
- name: Rollback release
74+
if: failure()
75+
run: |
76+
mvn release:rollback || echo "nothing to rollback"
77+
git push origin :refs/tags/${{ github.event.release.tag_name }}
78+
if [ ! -z "${{ steps.prepare_release.outputs.release_tag }}" ]
79+
then
80+
git tag -d ${{ steps.prepare_release.outputs.release_tag }}
81+
git push origin :refs/tags/${{ steps.prepare_release.outputs.release_tag }}
82+
fi

.gitignore

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,14 @@
1-
# Compiled class file
2-
*.class
3-
4-
# Log file
1+
.*
2+
!.gitignore
3+
!.gitattributes
4+
!.github
5+
!.editorconfig
6+
!.*.yml
7+
!.env.example
8+
**/target/
9+
*.iml
10+
**/logs/*.log
11+
*.db
12+
*.csv
513
*.log
6-
7-
# BlueJ files
8-
*.ctxt
9-
10-
# Mobile Tools for Java (J2ME)
11-
.mtj.tmp/
12-
13-
# Package Files #
14-
*.jar
15-
*.war
16-
*.nar
17-
*.ear
18-
*.zip
19-
*.tar.gz
20-
*.rar
21-
22-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23-
hs_err_pid*
24-
replay_pid*
14+
!.helmignore

.yamllint.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
extends: default
2+
rules:
3+
document-start:
4+
present: false
5+
truthy: disable
6+
comments:
7+
min-spaces-from-content: 1
8+
line-length:
9+
max: 150
10+
braces:
11+
min-spaces-inside: 0
12+
max-spaces-inside: 0
13+
brackets:
14+
min-spaces-inside: 0
15+
max-spaces-inside: 0
16+
indentation:
17+
indent-sequences: consistent

LICENSE renamed to LICENSE.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
Apache License
23
Version 2.0, January 2004
34
http://www.apache.org/licenses/

checkstyle-suppressions.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0"?>
2+
3+
<!DOCTYPE suppressions PUBLIC
4+
"-//Checkstyle//DTD SuppressionFilter Configuration 1.0//EN"
5+
"https://checkstyle.org/dtds/suppressions_1_0.dtd">
6+
7+
8+
<suppressions>
9+
<suppress checks="AbbreviationAsWordInName" files=".*"/>
10+
<suppress checks="MissingJavadocTypeCheck" files=".*"/>
11+
<suppress checks="MissingJavadocMethodCheck" files=".*"/>
12+
<suppress checks="MissingSwitchDefault" files=".*"/>
13+
<suppress checks="VariableDeclarationUsageDistance" files=".*"/>
14+
</suppressions>

0 commit comments

Comments
 (0)