Skip to content

Commit 0194212

Browse files
Publish snapshots
1 parent b0308e2 commit 0194212

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Publish Snapshot
10+
11+
on:
12+
push:
13+
branches: ["main"]
14+
15+
jobs:
16+
build:
17+
name: Publish Snapshot with Java ${{ matrix.jdk }} ${{ matrix.os }}
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
jdk: ['8']
23+
os: [ubuntu-latest]
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Set up JDK ${{ matrix.jdk }}
28+
uses: actions/setup-java@v4
29+
with:
30+
java-version: ${{ matrix.jdk }}
31+
distribution: 'temurin'
32+
cache: maven
33+
server-id: apache.snapshots.https
34+
server-username: NEXUS_USER
35+
server-password: NEXUS_PW
36+
- name: Deploy
37+
run: mvn -B deploy -DskipTests
38+
env:
39+
NEXUS_USER: ${{ secrets.NEXUS_USER }}
40+
NEXUS_PW: ${{ secrets.NEXUS_PW }}

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,5 +279,11 @@
279279
</plugin>
280280
</plugins>
281281
</reporting>
282+
<distributionManagement>
283+
<snapshotRepository>
284+
<id>apache.snapshots.https</id>
285+
<url>https://repository.apache.org/content/repositories/snapshots</url>
286+
</snapshotRepository>
287+
</distributionManagement>
282288

283289
</project>

0 commit comments

Comments
 (0)