diff --git a/.github/settings.xml b/.github/settings.xml
new file mode 100644
index 0000000..f221e9f
--- /dev/null
+++ b/.github/settings.xml
@@ -0,0 +1,12 @@
+
+
+
+ central
+ ${env.MAVEN_CENTRAL_USERNAME}
+ ${env.MAVEN_CENTRAL_PASSWORD}
+
+
+
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..18123a1
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,116 @@
+name: Release to Maven Central
+
+on:
+ push:
+ branches:
+ - 'release/*'
+
+permissions:
+ contents: write
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ environment: release
+
+ services:
+ mongo:
+ image: mongo:7.0
+ env:
+ MONGO_INITDB_ROOT_USERNAME: fluxgate
+ MONGO_INITDB_ROOT_PASSWORD: fluxgate123
+ MONGO_INITDB_DATABASE: fluxgate
+ ports:
+ - 27017:27017
+ options: >-
+ --health-cmd "mongosh --username fluxgate --password fluxgate123 --authenticationDatabase admin --eval 'db.adminCommand(\"ping\")'"
+ --health-interval=10s
+ --health-timeout=5s
+ --health-retries=5
+
+ redis:
+ image: redis:7-alpine
+ ports:
+ - 6379:6379
+ options: >-
+ --health-cmd "redis-cli ping"
+ --health-interval=10s
+ --health-timeout=5s
+ --health-retries=5
+
+ redis-cluster:
+ image: grokzen/redis-cluster:7.0.10
+ env:
+ IP: "0.0.0.0"
+ INITIAL_PORT: 7100
+ ports:
+ - 7100:7100
+ - 7101:7101
+ - 7102:7102
+ - 7103:7103
+ - 7104:7104
+ - 7105:7105
+ options: >-
+ --health-cmd "redis-cli -p 7100 cluster info | grep cluster_state:ok"
+ --health-interval=10s
+ --health-timeout=10s
+ --health-retries=10
+
+ env:
+ FLUXGATE_MONGO_URI: "mongodb://fluxgate:fluxgate123@localhost:27017/fluxgate?authSource=admin"
+ FLUXGATE_MONGO_DB: "fluxgate"
+ FLUXGATE_REDIS_URI: "redis://localhost:6379"
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ fetch-tags: true
+
+ - name: Set up JDK
+ uses: actions/setup-java@v4
+ with:
+ java-version: "21"
+ distribution: temurin
+ cache: maven
+
+ - name: Get version from latest tag
+ id: version
+ run: |
+ # Get latest tag (e.g., v0.1.0 or 0.1.0 -> 0.1.0)
+ VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')
+ echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
+ echo "Extracted version: $VERSION"
+
+ - name: Set version
+ run: mvn -B versions:set -DnewVersion=${{ steps.version.outputs.VERSION }} -DgenerateBackupPoms=false
+
+ - name: Build and test
+ run: mvn -B verify
+
+ - name: Import GPG key
+ uses: crazy-max/ghaction-import-gpg@v6
+ with:
+ gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
+ passphrase: ${{ secrets.GPG_PASSPHRASE }}
+
+ - name: Publish to Maven Central
+ env:
+ MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
+ MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
+ run: |
+ mvn -B deploy -Prelease -DskipTests \
+ -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} \
+ -s .github/settings.xml
+
+ - name: Create GitHub Release
+ uses: softprops/action-gh-release@v2
+ with:
+ tag_name: v${{ steps.version.outputs.VERSION }}
+ name: ${{ steps.version.outputs.VERSION }}
+ generate_release_notes: true
+ files: |
+ fluxgate-core/target/*.jar
+ fluxgate-redis-ratelimiter/target/*.jar
+ fluxgate-mongo-adapter/target/*.jar
+ fluxgate-spring-boot-starter/target/*.jar
diff --git a/.gitignore b/.gitignore
index 04457b1..df77ab8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -95,4 +95,7 @@ replay_pid*
# Temporary files
*.tmp
-*.temp
\ No newline at end of file
+*.temp
+
+# Secret
+private.key
\ No newline at end of file
diff --git a/INTEGRATION_TEST_GUIDE.md b/INTEGRATION_TEST_GUIDE.md
index 68fdab5..10b3da0 100644
--- a/INTEGRATION_TEST_GUIDE.md
+++ b/INTEGRATION_TEST_GUIDE.md
@@ -223,7 +223,7 @@ The following dependency was added to `fluxgate-testkit/pom.xml`:
```xml
- org.fluxgate
+ io.github.openfluxgate
fluxgate-redis-ratelimiter
${project.version}
diff --git a/README.ko.md b/README.ko.md
index 86b9997..1374a15 100644
--- a/README.ko.md
+++ b/README.ko.md
@@ -28,10 +28,10 @@
│ FluxGate Architecture │
├─────────────────────────────────────────────────────────────────────────┤
│ │
-│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────────┐ │
-│ │ Client │───▶│ Spring Boot │───▶│ FluxGate Filter │ │
-│ │ Application │ │ Application │ │ (Auto Rate Limiting) │ │
-│ └──────────────┘ └──────────────┘ └───────────┬──────────────┘ │
+│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────────┐ │
+│ │ Client │───▶│ Spring Boot │───▶│ FluxGate Filter │ │
+│ │ Application │ │ Application │ │ (Auto Rate Limiting) │ │
+│ └──────────────┘ └──────────────┘ └───────────┬──────────────┘ │
│ │ │
│ ┌───────────────────────────────┼───────────────┐ │
│ │ ▼ │ │
@@ -90,21 +90,21 @@
```xml
- org.fluxgate
+ io.github.openfluxgate
fluxgate-spring-boot-starter
0.0.1-SNAPSHOT
-org.fluxgate
+io.github.openfluxgate
fluxgate-redis-ratelimiter
0.0.1-SNAPSHOT
-org.fluxgate
+io.github.openfluxgate
fluxgate-mongo-adapter
0.0.1-SNAPSHOT
diff --git a/README.md b/README.md
index b09fde8..0b27be4 100644
--- a/README.md
+++ b/README.md
@@ -88,21 +88,21 @@ English | [한국어](README.ko.md)
```xml
- org.fluxgate
+ io.github.openfluxgate
fluxgate-spring-boot-starter
0.0.1-SNAPSHOT
- org.fluxgate
+ io.github.openfluxgate
fluxgate-redis-ratelimiter
0.0.1-SNAPSHOT
- org.fluxgate
+ io.github.openfluxgate
fluxgate-mongo-adapter
0.0.1-SNAPSHOT
diff --git a/fluxgate-core/README.md b/fluxgate-core/README.md
index 39ee20c..b1800ff 100644
--- a/fluxgate-core/README.md
+++ b/fluxgate-core/README.md
@@ -89,7 +89,7 @@ boolean allowed = checkIpLimit(ctx) && checkServiceLimit(ctx);
```xml
- org.fluxgate
+ io.github.openfluxgate
fluxgate-core
0.0.1-SNAPSHOT
diff --git a/fluxgate-core/pom.xml b/fluxgate-core/pom.xml
index 3897ff4..0b896a3 100644
--- a/fluxgate-core/pom.xml
+++ b/fluxgate-core/pom.xml
@@ -8,7 +8,7 @@
4.0.0
- org.fluxgate
+ io.github.openfluxgate
fluxgate
0.0.1-SNAPSHOT
diff --git a/fluxgate-mongo-adapter/README.md b/fluxgate-mongo-adapter/README.md
index 7488067..5dc99d9 100644
--- a/fluxgate-mongo-adapter/README.md
+++ b/fluxgate-mongo-adapter/README.md
@@ -22,7 +22,7 @@ Add the dependency to your `pom.xml`:
```xml
- org.fluxgate
+ io.github.openfluxgate
fluxgate-mongo-adapter
0.0.1-SNAPSHOT
diff --git a/fluxgate-mongo-adapter/pom.xml b/fluxgate-mongo-adapter/pom.xml
index 0abd411..3fef0b6 100644
--- a/fluxgate-mongo-adapter/pom.xml
+++ b/fluxgate-mongo-adapter/pom.xml
@@ -8,7 +8,7 @@
4.0.0
- org.fluxgate
+ io.github.openfluxgate
fluxgate
0.0.1-SNAPSHOT
@@ -26,7 +26,7 @@
- org.fluxgate
+ io.github.openfluxgate
fluxgate-core
${project.version}
diff --git a/fluxgate-redis-ratelimiter/README.md b/fluxgate-redis-ratelimiter/README.md
index c38026c..1c6e1b6 100644
--- a/fluxgate-redis-ratelimiter/README.md
+++ b/fluxgate-redis-ratelimiter/README.md
@@ -41,7 +41,7 @@ Add to your `pom.xml`:
```xml
- org.fluxgate
+ io.github.openfluxgate
fluxgate-redis-ratelimiter
${fluxgate.version}
diff --git a/fluxgate-redis-ratelimiter/pom.xml b/fluxgate-redis-ratelimiter/pom.xml
index 848fe7c..ad625e1 100644
--- a/fluxgate-redis-ratelimiter/pom.xml
+++ b/fluxgate-redis-ratelimiter/pom.xml
@@ -7,7 +7,7 @@
4.0.0
- org.fluxgate
+ io.github.openfluxgate
fluxgate
0.0.1-SNAPSHOT
@@ -25,7 +25,7 @@
- org.fluxgate
+ io.github.openfluxgate
fluxgate-core
${project.version}
diff --git a/fluxgate-samples/fluxgate-sample-api/pom.xml b/fluxgate-samples/fluxgate-sample-api/pom.xml
index 11759a5..7850040 100644
--- a/fluxgate-samples/fluxgate-sample-api/pom.xml
+++ b/fluxgate-samples/fluxgate-sample-api/pom.xml
@@ -7,7 +7,7 @@
4.0.0
- org.fluxgate
+ io.github.openfluxgate
fluxgate-samples
0.0.1-SNAPSHOT
diff --git a/fluxgate-samples/fluxgate-sample-filter/README.md b/fluxgate-samples/fluxgate-sample-filter/README.md
index 2fd8289..33136d0 100644
--- a/fluxgate-samples/fluxgate-sample-filter/README.md
+++ b/fluxgate-samples/fluxgate-sample-filter/README.md
@@ -165,7 +165,7 @@ To use direct Redis access instead of HTTP API:
```xml
- org.fluxgate
+ io.github.openfluxgate
fluxgate-redis-ratelimiter
${project.version}
diff --git a/fluxgate-samples/fluxgate-sample-filter/pom.xml b/fluxgate-samples/fluxgate-sample-filter/pom.xml
index 33fd037..7cb38a3 100644
--- a/fluxgate-samples/fluxgate-sample-filter/pom.xml
+++ b/fluxgate-samples/fluxgate-sample-filter/pom.xml
@@ -5,7 +5,7 @@
4.0.0
- org.fluxgate
+ io.github.openfluxgate
fluxgate-samples
0.0.1-SNAPSHOT
@@ -20,7 +20,7 @@
- org.fluxgate
+ io.github.openfluxgate
fluxgate-spring-boot-starter
${project.version}
@@ -29,7 +29,7 @@
- org.fluxgate
+ io.github.openfluxgate
fluxgate-spring-boot-starter
${project.version}
- org.fluxgate
+ io.github.openfluxgate
fluxgate-mongo-adapter
${project.version}
diff --git a/fluxgate-samples/fluxgate-sample-redis/pom.xml b/fluxgate-samples/fluxgate-sample-redis/pom.xml
index a9bae59..bd815cc 100644
--- a/fluxgate-samples/fluxgate-sample-redis/pom.xml
+++ b/fluxgate-samples/fluxgate-sample-redis/pom.xml
@@ -7,7 +7,7 @@
4.0.0
- org.fluxgate
+ io.github.openfluxgate
fluxgate-samples
0.0.1-SNAPSHOT
@@ -21,14 +21,14 @@
- org.fluxgate
+ io.github.openfluxgate
fluxgate-spring-boot-starter
${project.version}
- org.fluxgate
+ io.github.openfluxgate
fluxgate-redis-ratelimiter
${project.version}
diff --git a/fluxgate-samples/fluxgate-sample-standalone/pom.xml b/fluxgate-samples/fluxgate-sample-standalone/pom.xml
index fc89852..6c5aa9f 100644
--- a/fluxgate-samples/fluxgate-sample-standalone/pom.xml
+++ b/fluxgate-samples/fluxgate-sample-standalone/pom.xml
@@ -7,7 +7,7 @@
4.0.0
- org.fluxgate
+ io.github.openfluxgate
fluxgate-samples
0.0.1-SNAPSHOT
@@ -33,28 +33,28 @@
- org.fluxgate
+ io.github.openfluxgate
fluxgate-core
${project.version}
- org.fluxgate
+ io.github.openfluxgate
fluxgate-spring-boot-starter
${project.version}
- org.fluxgate
+ io.github.openfluxgate
fluxgate-mongo-adapter
${project.version}
- org.fluxgate
+ io.github.openfluxgate
fluxgate-redis-ratelimiter
${project.version}
diff --git a/fluxgate-samples/pom.xml b/fluxgate-samples/pom.xml
index 586a8c3..1e7014d 100644
--- a/fluxgate-samples/pom.xml
+++ b/fluxgate-samples/pom.xml
@@ -7,7 +7,7 @@
4.0.0
- org.fluxgate
+ io.github.openfluxgate
fluxgate
0.0.1-SNAPSHOT
@@ -31,6 +31,8 @@
2.6.0
true
+
+ true
diff --git a/fluxgate-spring-boot-starter/README.md b/fluxgate-spring-boot-starter/README.md
index e38f122..9420045 100644
--- a/fluxgate-spring-boot-starter/README.md
+++ b/fluxgate-spring-boot-starter/README.md
@@ -20,7 +20,7 @@ Add the starter to your `pom.xml`:
```xml
- org.fluxgate
+ io.github.openfluxgate
fluxgate-spring-boot-starter
${fluxgate.version}
@@ -33,14 +33,14 @@ The starter has optional dependencies. Include only what you need:
```xml
- org.fluxgate
+ io.github.openfluxgate
fluxgate-mongo-adapter
${fluxgate.version}
- org.fluxgate
+ io.github.openfluxgate
fluxgate-redis-ratelimiter
${fluxgate.version}
diff --git a/fluxgate-spring-boot-starter/pom.xml b/fluxgate-spring-boot-starter/pom.xml
index c9d816e..c005e25 100644
--- a/fluxgate-spring-boot-starter/pom.xml
+++ b/fluxgate-spring-boot-starter/pom.xml
@@ -7,7 +7,7 @@
4.0.0
- org.fluxgate
+ io.github.openfluxgate
fluxgate
0.0.1-SNAPSHOT
@@ -25,14 +25,14 @@
- org.fluxgate
+ io.github.openfluxgate
fluxgate-core
${project.version}
- org.fluxgate
+ io.github.openfluxgate
fluxgate-mongo-adapter
${project.version}
true
@@ -40,7 +40,7 @@
- org.fluxgate
+ io.github.openfluxgate
fluxgate-redis-ratelimiter
${project.version}
true
diff --git a/fluxgate-testkit/README.md b/fluxgate-testkit/README.md
index 9bbdb1e..02f1ccf 100644
--- a/fluxgate-testkit/README.md
+++ b/fluxgate-testkit/README.md
@@ -17,7 +17,7 @@ Add the testkit dependency to your test scope:
```xml
- org.fluxgate
+ io.github.openfluxgate
fluxgate-testkit
${fluxgate.version}
test
diff --git a/fluxgate-testkit/pom.xml b/fluxgate-testkit/pom.xml
index 066d616..d0984fc 100644
--- a/fluxgate-testkit/pom.xml
+++ b/fluxgate-testkit/pom.xml
@@ -6,7 +6,7 @@
4.0.0
- org.fluxgate
+ io.github.openfluxgate
fluxgate
0.0.1-SNAPSHOT
@@ -20,26 +20,28 @@
true
+
+ true
- org.fluxgate
+ io.github.openfluxgate
fluxgate-core
${project.version}
- org.fluxgate
+ io.github.openfluxgate
fluxgate-mongo-adapter
${project.version}
- org.fluxgate
+ io.github.openfluxgate
fluxgate-redis-ratelimiter
${project.version}
diff --git a/pom.xml b/pom.xml
index 0eb3bb3..86e4302 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
4.0.0
- org.fluxgate
+ io.github.openfluxgate
fluxgate
0.0.1-SNAPSHOT
pom
@@ -176,6 +176,35 @@
3.1.2
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 3.2.7
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+ org.sonatype.central
+ central-publishing-maven-plugin
+ 0.6.0
+ true
+
+ central
+ true
+ published
+
+
+
com.diffplug.spotless
@@ -256,13 +285,32 @@
-
-
-
- local-build
- local-build
- file://${project.build.directory}/repo
-
-
+
+
+
+
+ release
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+
+
+ org.sonatype.central
+ central-publishing-maven-plugin
+
+
+
+
+