Skip to content

Commit

Permalink
GH-140 - Enable snapshot deployment in CI builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
odrotbohm committed Oct 4, 2024
1 parent da4493d commit b6bbfb0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ jobs:
java-version: 11
cache: 'maven'

- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Build and deploy snapshot
run: ./mvnw -B deploy --file pom.xml -s settings.xml -DossrhUsername=${{ secrets.OSSRH_USERNAME }} -DossrhPassword=${{ secrets.OSSRH_PASSWORD }}
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,13 @@

</build>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<scm>
<url>https://github.com/xmolecules/jmolecules</url>
<connection>scm:git:https://github.com/xmolecules/jmolecules</connection>
Expand Down
11 changes: 11 additions & 0 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings 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/settings-1.0.0.xsd">
<servers>
<server>
<id>ossrh</id>
<username>${ossrhUsername}</username>
<password>${ossrhPassword}</password>
</server>
</servers>
</settings>

0 comments on commit b6bbfb0

Please sign in to comment.