Skip to content

Commit ade9d22

Browse files
committed
Deploy snapshot on Apache Nexus (#893)
1 parent 4c6252c commit ade9d22

File tree

2 files changed

+48
-20
lines changed

2 files changed

+48
-20
lines changed

.github/workflows/deploy-snapshot.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy snapshot
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy-snapshot:
10+
name: Deploy snapshot
11+
runs-on: ubuntu-latest
12+
if: "!startsWith(github.ref, 'refs/tags/v')"
13+
steps:
14+
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Java 17
19+
uses: actions/setup-java@v3
20+
with:
21+
java-version: 17
22+
distribution: temurin
23+
cache: maven
24+
server-id: apache.snapshots.https
25+
server-username: NEXUS_USER
26+
server-password: NEXUS_PW
27+
gpg-private-key: ${{ secrets.BAREMAPS_GPG_SECRET_KEY }}
28+
29+
- name: Set up GPG
30+
run: |
31+
echo "${{ secrets.BAREMAPS_GPG_SECRET_KEY }}" | gpg --batch --import
32+
gpg --list-keys
33+
env:
34+
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
35+
36+
- name: Publish snapshots on Apache Nexus
37+
env:
38+
NEXUS_USER: ${{ secrets.NEXUS_USER }}
39+
NEXUS_PW: ${{ secrets.NEXUS_PW }}
40+
run: |
41+
./mvnw deploy -DskipTests -Dmaven.javadoc.skip=true -B -V

pom.xml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ limitations under the License.
1818
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1919
<modelVersion>4.0.0</modelVersion>
2020

21+
<parent>
22+
<groupId>org.apache</groupId>
23+
<artifactId>apache</artifactId>
24+
<version>23</version>
25+
</parent>
26+
2127
<groupId>org.apache.baremaps</groupId>
2228
<artifactId>baremaps</artifactId>
2329
<version>0.7.4-SNAPSHOT</version>
@@ -29,7 +35,7 @@ limitations under the License.
2935

3036
<organization>
3137
<name>baremaps</name>
32-
<url>https://www.baremaps.com/</url>
38+
<url>https://baremaps.apache.org/</url>
3339
</organization>
3440

3541
<licenses>
@@ -40,14 +46,6 @@ limitations under the License.
4046
</license>
4147
</licenses>
4248

43-
<developers>
44-
<developer>
45-
<id>bchapuis</id>
46-
<name>Bertil Chapuis</name>
47-
<email>bchapuis@gmail.com</email>
48-
</developer>
49-
</developers>
50-
5149
<modules>
5250
<module>baremaps-cli</module>
5351
<module>baremaps-core</module>
@@ -67,17 +65,6 @@ limitations under the License.
6765
<url>scm:git:git@github.com:apache/baremaps.git</url>
6866
</scm>
6967

70-
<distributionManagement>
71-
<repository>
72-
<id>maven</id>
73-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
74-
</repository>
75-
<snapshotRepository>
76-
<id>maven</id>
77-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
78-
</snapshotRepository>
79-
</distributionManagement>
80-
8168
<properties>
8269
<maven.compiler.source>17</maven.compiler.source>
8370
<maven.compiler.target>17</maven.compiler.target>

0 commit comments

Comments
 (0)