Skip to content

Commit bb3d077

Browse files
authored
project setup & base rules (#1)
* project setup * add base rules * fix issues
1 parent 29aad33 commit bb3d077

23 files changed

Lines changed: 1534 additions & 0 deletions

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
max_line_length = 120
10+
tab_width = 4
11+
ij_continuation_indent_size = 8
12+
13+
[*.yml]
14+
indent_size = 2
15+
16+
[*.md]
17+
max_line_length = off

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf encoding=utf-8

.github/workflows/main.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Main
2+
3+
on: push
4+
5+
concurrency:
6+
group: ${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-24.04
12+
timeout-minutes: 10
13+
steps:
14+
- uses: actions/checkout@v5
15+
- uses: aboutbits/github-actions-java/setup-with-maven@v4
16+
with:
17+
java-version: 25
18+
- name: Test
19+
env:
20+
GITHUB_USER_NAME: ${{ github.actor }}
21+
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
run: >-
23+
./mvnw
24+
-s $GITHUB_WORKSPACE/.github/workflows/maven-settings.xml
25+
--batch-mode
26+
--fail-fast
27+
-Dsurefire.failIfNoSpecifiedTests=false
28+
test
29+
shell: bash
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
http://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
6+
<activeProfiles>
7+
<activeProfile>github</activeProfile>
8+
</activeProfiles>
9+
10+
<profiles>
11+
<profile>
12+
<id>github</id>
13+
<repositories>
14+
<repository>
15+
<id>central</id>
16+
<url>https://repo1.maven.org/maven2</url>
17+
</repository>
18+
<repository>
19+
<id>github</id>
20+
<url>https://maven.pkg.github.com/aboutbits/*</url>
21+
</repository>
22+
</repositories>
23+
<pluginRepositories>
24+
<pluginRepository>
25+
<id>central</id>
26+
<url>https://repo1.maven.org/maven2</url>
27+
</pluginRepository>
28+
<pluginRepository>
29+
<id>github</id>
30+
<url>https://maven.pkg.github.com/aboutbits/*</url>
31+
</pluginRepository>
32+
</pluginRepositories>
33+
</profile>
34+
</profiles>
35+
36+
<servers>
37+
<server>
38+
<id>github</id>
39+
<username>${env.GITHUB_USER_NAME}</username>
40+
<password>${env.GITHUB_ACCESS_TOKEN}</password>
41+
</server>
42+
</servers>
43+
</settings>

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release Package
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Version (eg: x.x.x)"
8+
type: string
9+
required: true
10+
11+
jobs:
12+
build-and-publish:
13+
runs-on: ubuntu-24.04
14+
timeout-minutes: 15
15+
steps:
16+
- uses: actions/checkout@v5
17+
with:
18+
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
19+
- uses: aboutbits/github-actions-base/git-setup@v2
20+
- uses: aboutbits/github-actions-java/setup-with-maven@v4
21+
with:
22+
java-version: 25
23+
- uses: aboutbits/github-actions-java/set-version-with-maven@v4
24+
with:
25+
version: "${{ github.event.inputs.version }}"
26+
- name: Publish package
27+
env:
28+
GITHUB_USER_NAME: ${{ github.actor }}
29+
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: mvn -s $GITHUB_WORKSPACE/.github/workflows/maven-settings.xml --batch-mode deploy
31+
shell: bash
32+
- uses: aboutbits/github-actions-base/git-commit-and-push-all@v2
33+
with:
34+
message: '${{ github.event.inputs.version }}'
35+
- uses: aboutbits/github-actions-base/git-create-or-update-tag@v2
36+
with:
37+
tag-name: 'v${{ github.event.inputs.version }}'
38+
- uses: aboutbits/github-actions-base/github-create-release@v2
39+
with:
40+
tag-name: 'v${{ github.event.inputs.version }}'

.gitignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
HELP.md
2+
target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**/target/
5+
!**/src/test/**/target/
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
18+
.idea/*
19+
!.idea/codeStyles
20+
!.idea/.gitignore
21+
!.idea/checkstyle-idea.xml
22+
!.idea/encodings.xml
23+
!.idea/misc.xml
24+
!.idea/sqldialects.xml
25+
!.idea/vcs.xml
26+
27+
*.iml
28+
*.ipr
29+
*.iws
30+
31+
### NetBeans ###
32+
/nbproject/private/
33+
/nbbuild/
34+
/dist/
35+
/nbdist/
36+
/.nb-gradle/
37+
build/
38+
!**/src/main/**/build/
39+
!**/src/test/**/build/
40+
41+
### VS Code ###
42+
.vscode/
43+
44+
### Mac ###
45+
.DS_Store
46+
47+
### Local Development ###
48+
application-local.yml

.idea/.gitignore

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/checkstyle-idea.xml

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/Project.xml

Lines changed: 48 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)