Skip to content

Commit 76e7b82

Browse files
authored
Initial commit
0 parents  commit 76e7b82

23 files changed

+3416
-0
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: xemantic

.github/workflows/build-branch.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Builds every branch other than main, so that any change pushed to GitHub in a feature branch can be built and tested
2+
name: Build branch
3+
4+
on:
5+
push:
6+
branches-ignore:
7+
- main
8+
pull_request:
9+
branches-ignore:
10+
- main
11+
12+
jobs:
13+
build_branch:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout sources
17+
uses: actions/checkout@v5.0.0
18+
19+
- name: Setup Java
20+
uses: actions/setup-java@v5.0.0
21+
with:
22+
distribution: ${{ vars.DEFAULT_JAVA_DISTRIBUTION }}
23+
java-version: ${{ vars.DEFAULT_JAVA_VERSION }}
24+
25+
- name: Setup Gradle
26+
uses: gradle/actions/setup-gradle@v5.0.0
27+
28+
- name: Build
29+
run: ./gradlew build

.github/workflows/build-main.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Builds than main branch, and then deploys SNAPSHOT versions to GitHub Packages
2+
name: Build main
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build_main:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout sources
14+
uses: actions/checkout@v5.0.0
15+
16+
- name: Setup Java
17+
uses: actions/setup-java@v5.0.0
18+
with:
19+
distribution: ${{ vars.DEFAULT_JAVA_DISTRIBUTION }}
20+
java-version: ${{ vars.DEFAULT_JAVA_VERSION }}
21+
22+
- name: Setup Gradle
23+
uses: gradle/actions/setup-gradle@v5.0.0
24+
25+
- name: Build and Publish SNAPSHOT
26+
env:
27+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
28+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
29+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
30+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
31+
32+
run: ./gradlew build publishToMavenCentral --no-configuration-cache
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Builds the release
2+
name: Build release
3+
4+
on:
5+
release:
6+
types: [ published ]
7+
8+
jobs:
9+
build_release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
# Give the default GITHUB_TOKEN write permission to commit and push the
13+
# added or changed files to the repository.
14+
contents: write
15+
steps:
16+
- name: Write release version
17+
run: |
18+
VERSION=${GITHUB_REF_NAME#v}
19+
echo Version: $VERSION
20+
echo "VERSION=$VERSION" >> $GITHUB_ENV
21+
22+
- name: Checkout sources
23+
uses: actions/checkout@v5.0.0
24+
25+
- name: Setup Java
26+
uses: actions/setup-java@v5.0.0
27+
with:
28+
distribution: ${{ vars.DEFAULT_JAVA_DISTRIBUTION }}
29+
java-version: ${{ vars.DEFAULT_JAVA_VERSION }}
30+
31+
- name: Setup Gradle
32+
uses: gradle/actions/setup-gradle@v5.0.0
33+
34+
- name: Build and Publish release
35+
env:
36+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
37+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
38+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
39+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
40+
# TODO skip JRELEASER for private projects
41+
JRELEASER_DISCORD_WEBHOOK: ${{ secrets.DISCORD_ANNOUCEMENTS_WEBHOOK }}
42+
JRELEASER_LINKEDIN_ACCESS_TOKEN: ${{ secrets.LINKEDIN_ACCESS_TOKEN }}
43+
JRELEASER_LINKEDIN_OWNER: ${{ secrets.LINKEDIN_OWNER }}
44+
JRELEASER_BLUESKY_HOST: ${{ vars.BLUESKY_HOST }}
45+
JRELEASER_BLUESKY_HANDLE: ${{ vars.BLUESKY_HANDLE }}
46+
JRELEASER_BLUESKY_PASSWORD: ${{ secrets.BLUESKY_PASSWORD }}
47+
# TODO if deploying to GitHub Packages (private projects)
48+
# ORG_GRADLE_PROJECT_GitHubPackagesUsername: ${{ secrets.GITHUBACTOR }}
49+
# ORG_GRADLE_PROJECT_GitHubPackagesPassword: ${{ secrets.GITHUBTOKEN }}
50+
# TODO if deploying to GitHubPackages use publishAllPublicationsToGitHubPackagesRepository and no jreleaserAnnounce
51+
run: ./gradlew -Pversion=$VERSION build publishToMavenCentral jreleaserAnnounce --no-configuration-cache
52+
53+
- name: Get target branch for tag
54+
run: |
55+
git fetch --all
56+
TARGET_BRANCH=$(git branch -r --contains $GITHUB_REF | grep -v "HEAD" | head -n 1 | sed 's/origin\///')
57+
echo "Target branch for tag: $TARGET_BRANCH"
58+
echo "TARGET_BRANCH=$TARGET_BRANCH" >> $GITHUB_ENV
59+
60+
- name: Checkout target branch
61+
uses: actions/checkout@v5.0.0
62+
with:
63+
ref: ${{ env.TARGET_BRANCH }}
64+
fetch-depth: 0
65+
66+
- name: Update versions after release
67+
run: ./gradlew -Pversion=$VERSION updateVersionsAfterRelease
68+
69+
- name: Commit version updates after release
70+
uses: stefanzweifel/git-auto-commit-action@v7.0.0
71+
with:
72+
commit_message: Version updated to ${{ env.VERSION }} in README.md, next snapshot in gradle.properties
73+
file_pattern: 'README.md gradle.properties'

.github/workflows/updater.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: GitHub Actions Version Updater
2+
3+
# Controls when the action will run.
4+
on:
5+
schedule:
6+
# Automatically run on every Sunday
7+
- cron: '0 0 * * 0'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Git checkout
15+
uses: actions/checkout@v5.0.0
16+
with:
17+
# [Required] Access token with `workflow` scope.
18+
token: ${{ secrets.WORKFLOW_SECRET }}
19+
20+
- name: Run GitHub Actions Version Updater
21+
uses: saadmk11/github-actions-version-updater@v0.9.0
22+
with:
23+
# [Required] Access token with `workflow` scope.
24+
token: ${{ secrets.WORKFLOW_SECRET }}

.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**/build/
5+
!**/src/test/**/build/
6+
7+
### IntelliJ IDEA ###
8+
/.idea/
9+
!/.idea/copyright/
10+
*.iws
11+
*.iml
12+
*.ipr
13+
out/
14+
!**/src/main/**/out/
15+
!**/src/test/**/out/
16+
17+
### Kotlin ###
18+
.kotlin
19+
20+
### Eclipse ###
21+
.apt_generated
22+
.classpath
23+
.factorypath
24+
.project
25+
.settings
26+
.springBeans
27+
.sts4-cache
28+
bin/
29+
!**/src/main/**/bin/
30+
!**/src/test/**/bin/
31+
32+
### NetBeans ###
33+
/nbproject/private/
34+
/nbbuild/
35+
/dist/
36+
/nbdist/
37+
/.nb-gradle/
38+
39+
### VS Code ###
40+
.vscode/
41+
42+
### Mac OS ###
43+
.DS_Store
44+
45+
/*.hprof

.idea/copyright/apache2_0.xml

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

.idea/copyright/profiles_settings.xml

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

CHECKLIST.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# A checklist for adjustments after staring new project out of this template
2+
3+
> [!NOTE]
4+
> When going through these files, remember to not only perform a change, but also remove the `TODO` comments.
5+
6+
* [ ] Change project name in [settings.gradle.kts](settings.gradle.kts).
7+
* [ ] Adjust [gradle.properties](gradle.properties) if needed.
8+
* [ ] Check the license, if Apache 2.0 is not the license you intended, then replace it in:
9+
* [LICENSE](LICENSE)
10+
* [.idea/copyright](.idea/copyright) folder (it is easier to edit it through IDEA settings)
11+
* [ ] Update [README.md](README.md) with the description and rationale behind your project. Remove irrelevant part focused on the template project.
12+
* [ ] Go through [build.gradle.kts](build.gradle.kts) and fix all the TODOs.
13+
* [ ] Delete this `CHECKLIST.md` file

0 commit comments

Comments
 (0)