Skip to content

Commit

Permalink
Deploy snapshot on Apache Nexus (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
bchapuis committed Sep 8, 2024
1 parent 4c6252c commit ade9d22
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 20 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/deploy-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy snapshot

on:
push:
branches:
- main

jobs:
deploy-snapshot:
name: Deploy snapshot
runs-on: ubuntu-latest
if: "!startsWith(github.ref, 'refs/tags/v')"
steps:

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

- name: Set up Java 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
cache: maven
server-id: apache.snapshots.https
server-username: NEXUS_USER
server-password: NEXUS_PW
gpg-private-key: ${{ secrets.BAREMAPS_GPG_SECRET_KEY }}

- name: Set up GPG
run: |
echo "${{ secrets.BAREMAPS_GPG_SECRET_KEY }}" | gpg --batch --import
gpg --list-keys
env:
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}

- name: Publish snapshots on Apache Nexus
env:
NEXUS_USER: ${{ secrets.NEXUS_USER }}
NEXUS_PW: ${{ secrets.NEXUS_PW }}
run: |
./mvnw deploy -DskipTests -Dmaven.javadoc.skip=true -B -V
27 changes: 7 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ limitations under the License.
<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">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>23</version>
</parent>

<groupId>org.apache.baremaps</groupId>
<artifactId>baremaps</artifactId>
<version>0.7.4-SNAPSHOT</version>
Expand All @@ -29,7 +35,7 @@ limitations under the License.

<organization>
<name>baremaps</name>
<url>https://www.baremaps.com/</url>
<url>https://baremaps.apache.org/</url>
</organization>

<licenses>
Expand All @@ -40,14 +46,6 @@ limitations under the License.
</license>
</licenses>

<developers>
<developer>
<id>bchapuis</id>
<name>Bertil Chapuis</name>
<email>[email protected]</email>
</developer>
</developers>

<modules>
<module>baremaps-cli</module>
<module>baremaps-core</module>
Expand All @@ -67,17 +65,6 @@ limitations under the License.
<url>scm:git:[email protected]:apache/baremaps.git</url>
</scm>

<distributionManagement>
<repository>
<id>maven</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>maven</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
Expand Down

0 comments on commit ade9d22

Please sign in to comment.