Skip to content

Commit 31f5a5d

Browse files
Merge pull request #1 from jacopocarlini/maven-central
maven-central
2 parents 20f866c + c256af8 commit 31f5a5d

File tree

2 files changed

+112
-29
lines changed

2 files changed

+112
-29
lines changed

.github/workflows/package.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- main
77
workflow_dispatch:
88

9+
910
jobs:
1011
publish:
1112
runs-on: ubuntu-latest
@@ -17,24 +18,35 @@ jobs:
1718
- name: Checkout code
1819
uses: actions/checkout@v4
1920

20-
- name: Set up Java
21+
- name: Setup Java
2122
uses: actions/setup-java@v4
2223
with:
2324
distribution: 'temurin'
2425
java-version: '17'
25-
cache: 'maven'
2626

2727
- name: Set up Maven
2828
uses: stCarolas/setup-maven@07fbbe97d97ef44336b7382563d66743297e442f # v4.5
2929
with:
3030
maven-version: 3.8.2
3131

32-
- name: Cache Maven packages
33-
uses: actions/cache@v4
34-
with:
35-
path: ~/.m2
36-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
37-
restore-keys: ${{ runner.os }}-m2
32+
- name: Import GPG Key
33+
run: |
34+
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
35+
env:
36+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
37+
38+
# - name: Cache Maven packages
39+
# uses: actions/cache@v4
40+
# with:
41+
# path: ~/.m2
42+
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
43+
# restore-keys: ${{ runner.os }}-m2
44+
45+
- name: Create settings.xml
46+
run: echo "$MAVEN_SETTINGS" > $HOME/.m2/settings.xml
47+
shell: bash
48+
env:
49+
MAVEN_SETTINGS: ${{ secrets.MAVEN_SETTINGS }}
3850

3951
- name: Build with Maven
4052
run: mvn -B package --file pom.xml
@@ -46,11 +58,6 @@ jobs:
4658
env:
4759
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4860

49-
50-
- name: Java Maven release
51-
uses: qcastel/github-actions-maven-release@master
52-
with:
53-
git-release-bot-name: "bot-idhub"
54-
git-release-bot-email: "bot@idhub.io"
55-
maven-args: "-Dmaven.javadoc.skip=true -DskipTests -DskipITs -Ddockerfile.skip -DdockerCompose.skip -Dmaven.deploy.skip=true"
56-
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
61+
- name: Publish to Maven Central
62+
run: |
63+
mvn deploy

pom.xml

Lines changed: 89 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,48 @@
66

77
<groupId>io.github.jacopocarlini</groupId>
88
<artifactId>fast-feature-flags-provider</artifactId>
9-
<version>1.1.1</version>
9+
<version>1.1.2-1</version>
10+
<name>${project.groupId}:${project.artifactId}</name>
1011
<packaging>jar</packaging>
11-
12+
<url>https://github.com/jacopocarlini/fast-feature-flags-provider</url>
13+
<description>A MongoDB provider for openfeature.</description>
1214

1315
<properties>
1416
<java.version>17</java.version>
1517
<maven.compiler.source>17</maven.compiler.source>
1618
<maven.compiler.target>17</maven.compiler.target>
1719
</properties>
1820

21+
<developers>
22+
<developer>
23+
<id>jacopocarlini</id>
24+
<name>Jacopo Carlini</name>
25+
<email>jacopo1395@gmail.com</email>
26+
</developer>
27+
</developers>
28+
<licenses>
29+
<license>
30+
<name>MIT License</name>
31+
<url>https://opensource.org/licenses/MIT</url>
32+
<distribution>repo</distribution>
33+
</license>
34+
</licenses>
35+
<scm>
36+
<connection>scm:git:git://github.com/jacopocarlini/fast-feature-flags-provider.git</connection>
37+
<developerConnection>scm:git:ssh://github.com/jacopocarlini/fast-feature-flags-provider.git</developerConnection>
38+
<url>https://github.com/jacopocarlini/fast-feature-flags-provider/tree/main</url>
39+
</scm>
40+
41+
<distributionManagement>
42+
<snapshotRepository>
43+
<id>ossrh</id>
44+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
45+
</snapshotRepository>
46+
<repository>
47+
<id>ossrh</id>
48+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
49+
</repository>
50+
</distributionManagement>
1951

2052
<dependencyManagement>
2153
<dependencies>
@@ -28,7 +60,6 @@
2860
</dependency>
2961
</dependencies>
3062
</dependencyManagement>
31-
3263
<dependencies>
3364
<dependency>
3465
<groupId>org.springframework.boot</groupId>
@@ -62,6 +93,7 @@
6293
</dependency>
6394

6495
</dependencies>
96+
6597
<repositories>
6698
<repository>
6799
<snapshots>
@@ -72,6 +104,7 @@
72104
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
73105
</repository>
74106
</repositories>
107+
75108
<build>
76109
<plugins>
77110
<plugin>
@@ -87,19 +120,62 @@
87120
</configuration>
88121
</plugin>
89122
<plugin>
90-
<artifactId>maven-release-plugin</artifactId>
91-
<version>3.1.1</version>
123+
<groupId>org.apache.maven.plugins</groupId>
124+
<artifactId>maven-source-plugin</artifactId>
125+
<version>3.2.1</version>
126+
<executions>
127+
<execution>
128+
<id>attach-sources</id>
129+
<goals>
130+
<goal>jar-no-fork</goal>
131+
</goals>
132+
</execution>
133+
</executions>
134+
</plugin>
135+
<plugin>
136+
<groupId>org.apache.maven.plugins</groupId>
137+
<artifactId>maven-javadoc-plugin</artifactId>
138+
<version>3.4.1</version>
139+
<executions>
140+
<execution>
141+
<id>attach-javadocs</id>
142+
<goals>
143+
<goal>jar</goal>
144+
</goals>
145+
</execution>
146+
</executions>
147+
</plugin>
148+
<plugin>
149+
<groupId>org.apache.maven.plugins</groupId>
150+
<artifactId>maven-gpg-plugin</artifactId>
151+
<version>1.5</version>
152+
<executions>
153+
<execution>
154+
<id>sign-artifacts</id>
155+
<phase>verify</phase>
156+
<goals>
157+
<goal>sign</goal>
158+
</goals>
159+
</execution>
160+
</executions>
92161
<configuration>
93-
<scmCommentPrefix>[ci skip]</scmCommentPrefix>
162+
<gpgArguments>
163+
<gpgArgument>--batch</gpgArgument>
164+
<gpgArgument>--pinentry-mode</gpgArgument>
165+
<gpgArgument>loopback</gpgArgument>
166+
</gpgArguments>
167+
</configuration>
168+
</plugin>
169+
<plugin>
170+
<groupId>org.sonatype.central</groupId>
171+
<artifactId>central-publishing-maven-plugin</artifactId>
172+
<version>0.7.0</version>
173+
<extensions>true</extensions>
174+
<configuration>
175+
<publishingServerId>central</publishingServerId>
176+
<autoPublish>true</autoPublish>
94177
</configuration>
95178
</plugin>
96179
</plugins>
97180
</build>
98-
99-
<scm>
100-
<connection>scm:git:${project.scm.url}</connection>
101-
<developerConnection>scm:git:${project.scm.url}</developerConnection>
102-
<url>https://github.com/jacopocarlini/fast-feature-flags-provider.git</url>
103-
<tag>HEAD</tag>
104-
</scm>
105181
</project>

0 commit comments

Comments
 (0)