Skip to content

Commit 036bb3e

Browse files
committed
GH-140 - Enable snapshot deployment in CI builds.
1 parent da4493d commit 036bb3e

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

Diff for: .github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ jobs:
2222
java-version: 11
2323
cache: 'maven'
2424

25-
- name: Build with Maven
26-
run: mvn -B package --file pom.xml
25+
- name: Build and deploy snapshot
26+
run: ./mvnw -B deploy --file pom.xml -s settings.xml -DossrhUsername=${{ secrets.OSSRH_USERNAME }} -DossrhPassword=${{ secrets.OSSRH_PASSWORD }}

Diff for: pom.xml

+7
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,13 @@
231231

232232
</build>
233233

234+
<distributionManagement>
235+
<snapshotRepository>
236+
<id>ossrh</id>
237+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
238+
</snapshotRepository>
239+
</distributionManagement>
240+
234241
<scm>
235242
<url>https://github.com/xmolecules/jmolecules</url>
236243
<connection>scm:git:https://github.com/xmolecules/jmolecules</connection>

Diff for: settings.xml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
4+
<servers>
5+
<server>
6+
<id>ossrh</id>
7+
<username>${ossrhUsername}</username>
8+
<password>${ossrhPassword}</password>
9+
</server>
10+
</servers>
11+
</settings>

0 commit comments

Comments
 (0)