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
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI

on:
pull_request:
branches:
- main
- dev

jobs:
build:
runs-on: ubuntu-latest

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

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: maven

- name: Build and test
run: mvn -B clean verify
88 changes: 88 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Release to Maven Central

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
server-id: central
server-username: CENTRAL_USERNAME
server-password: CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE

- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Get current version and increment
id: version
run: |
CURRENT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "current=$CURRENT_VERSION" >> $GITHUB_OUTPUT

# Remove -SNAPSHOT if present
RELEASE_VERSION=${CURRENT_VERSION%-SNAPSHOT}
echo "release=$RELEASE_VERSION" >> $GITHUB_OUTPUT

# Calculate next version (increment patch)
IFS='.' read -r major minor patch <<< "$RELEASE_VERSION"
NEXT_VERSION="$major.$minor.$((patch + 1))-SNAPSHOT"
echo "next=$NEXT_VERSION" >> $GITHUB_OUTPUT

- name: Set release version
run: |
mvn versions:set -DnewVersion=${{ steps.version.outputs.release }} -DgenerateBackupPoms=false

- name: Build and verify
run: mvn -B clean verify -Prelease
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Deploy to Maven Central
run: mvn -B deploy -Prelease -DskipTests
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Create Git tag
run: |
git tag -a "v${{ steps.version.outputs.release }}" -m "Release v${{ steps.version.outputs.release }}"
git push origin "v${{ steps.version.outputs.release }}"

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.version.outputs.release }}
name: Release v${{ steps.version.outputs.release }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set next development version
run: |
mvn versions:set -DnewVersion=${{ steps.version.outputs.next }} -DgenerateBackupPoms=false
git add pom.xml
git commit -m "chore: bump version to ${{ steps.version.outputs.next }} [skip ci]"
git push origin main
31 changes: 31 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Dev Build

on:
push:
branches:
- dev

jobs:
build:
runs-on: ubuntu-latest

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

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: maven

- name: Build and test
run: mvn -B clean verify

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: endee-java-client-dev
path: target/*.jar
retention-days: 7
95 changes: 95 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# ==================== Build Output ====================
target/
build/
out/
bin/
*.class
*.jar
*.war
*.ear
*.nar

# ==================== Maven ====================
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar

# ==================== IDE - IntelliJ IDEA ====================
.idea/
*.iml
*.ipr
*.iws
.idea_modules/
atlassian-ide-plugin.xml

# ==================== IDE - Eclipse ====================
.classpath
.project
.settings/
.metadata/
*.launch
.loadpath
.recommenders/
.externalToolBuilders/

# ==================== IDE - NetBeans ====================
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

# ==================== IDE - VS Code ====================
.vscode/
*.code-workspace

# ==================== OS Files ====================
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
desktop.ini

# ==================== Logs ====================
*.log
logs/

# ==================== Environment & Secrets ====================
.env
.env.*
*.env
*.pem
*.key
credentials.json
secrets.json

# ==================== Test Files (Manual Tests) ====================
src/test/

# ==================== Temporary Files ====================
*.tmp
*.temp
*.swp
*.swo
*~
\#*\#

# ==================== Package Manager ====================
node_modules/

# ==================== Coverage Reports ====================
coverage/
*.lcov
jacoco.exec

# AI Tools
.claude
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Endee Labs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
Loading