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
12 changes: 12 additions & 0 deletions .github/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>central</id>
<username>${env.MAVEN_CENTRAL_USERNAME}</username>
<password>${env.MAVEN_CENTRAL_PASSWORD}</password>
</server>
</servers>
</settings>
116 changes: 116 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,7 @@ replay_pid*

# Temporary files
*.tmp
*.temp
*.temp

# Secret
private.key
2 changes: 1 addition & 1 deletion INTEGRATION_TEST_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ The following dependency was added to `fluxgate-testkit/pom.xml`:
```xml
<!-- redis-ratelimiter -->
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-redis-ratelimiter</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
14 changes: 7 additions & 7 deletions README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) │
│ └──────────────┘ └──────────────┘ └───────────┬──────────────┘
│ │ │
│ ┌───────────────────────────────┼───────────────┐ │
│ │ ▼ │ │
Expand Down Expand Up @@ -90,21 +90,21 @@
```xml

<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-spring-boot-starter</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<!-- Redis 기반 Rate Limiting -->
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-redis-ratelimiter</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<!-- MongoDB 규칙 관리 (선택사항) -->
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-mongo-adapter</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,21 @@ English | [한국어](README.ko.md)

```xml
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-spring-boot-starter</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<!-- For Redis-backed rate limiting -->
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-redis-ratelimiter</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<!-- For MongoDB rule management (optional) -->
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-mongo-adapter</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion fluxgate-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ boolean allowed = checkIpLimit(ctx) && checkServiceLimit(ctx);

```xml
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-core</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion fluxgate-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion fluxgate-mongo-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Add the dependency to your `pom.xml`:
```xml

<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-mongo-adapter</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions fluxgate-mongo-adapter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
Expand All @@ -26,7 +26,7 @@
<dependencies>
<!-- FluxGate Core -->
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-core</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion fluxgate-redis-ratelimiter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Add to your `pom.xml`:

```xml
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-redis-ratelimiter</artifactId>
<version>${fluxgate.version}</version>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions fluxgate-redis-ratelimiter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
Expand All @@ -25,7 +25,7 @@
<dependencies>
<!-- FluxGate Core -->
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-core</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion fluxgate-samples/fluxgate-sample-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-samples</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion fluxgate-samples/fluxgate-sample-filter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ To use direct Redis access instead of HTTP API:

```xml
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-redis-ratelimiter</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
6 changes: 3 additions & 3 deletions fluxgate-samples/fluxgate-sample-filter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-samples</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
Expand All @@ -20,7 +20,7 @@
<dependencies>
<!-- FluxGate Spring Boot Starter -->
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-spring-boot-starter</artifactId>
<version>${project.version}</version>
</dependency>
Expand All @@ -29,7 +29,7 @@
<!-- Uncomment this if using RedisRateLimitHandler instead of HttpRateLimitHandler -->
<!--
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-redis-ratelimiter</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
6 changes: 3 additions & 3 deletions fluxgate-samples/fluxgate-sample-mongo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-samples</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
Expand All @@ -21,14 +21,14 @@
<dependencies>
<!-- FluxGate Spring Boot Starter -->
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-spring-boot-starter</artifactId>
<version>${project.version}</version>
</dependency>

<!-- FluxGate MongoDB Adapter -->
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-mongo-adapter</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
6 changes: 3 additions & 3 deletions fluxgate-samples/fluxgate-sample-redis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-samples</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
Expand All @@ -21,14 +21,14 @@
<dependencies>
<!-- FluxGate Spring Boot Starter -->
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-spring-boot-starter</artifactId>
<version>${project.version}</version>
</dependency>

<!-- FluxGate Redis Rate Limiter -->
<dependency>
<groupId>org.fluxgate</groupId>
<groupId>io.github.openfluxgate</groupId>
<artifactId>fluxgate-redis-ratelimiter</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
Loading
Loading