Skip to content

Commit b2a5b0c

Browse files
committed
add pom dans build to build examples in git
1 parent e8c6b6c commit b2a5b0c

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

.github/workflows/maven-build.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,15 @@ jobs:
1919
java-version: '17'
2020
distribution: 'temurin'
2121
cache: maven
22+
2223
- name: Build with Maven
23-
run: mvn -B package --file pom.xml
24+
env:
25+
GH_MAVEN_REGISTRY_USER: ${{ secrets.PRIVATE_ACCESS_TOKEN_USER }}
26+
GH_MAVEN_REGISTRY_ACCESS_TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }}
27+
run: mvn -s settings.xml install
28+
29+
- name: Deploy to registry
30+
env:
31+
GH_MAVEN_REGISTRY_USER: ${{ secrets.PRIVATE_ACCESS_TOKEN_USER }}
32+
GH_MAVEN_REGISTRY_ACCESS_TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }}
33+
run: mvn --batch-mode -e -X -s settings.xml deploy -DskipTests

settings.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<settings>
2+
<servers>
3+
<server>
4+
<id>github</id>
5+
<username>${env.GH_MAVEN_REGISTRY_USER}</username>
6+
<password>${env.GH_MAVEN_REGISTRY_ACCESS_TOKEN}</password>
7+
</server>
8+
<server>
9+
<id>github-marc</id>
10+
<username>${env.GH_MAVEN_REGISTRY_USER}</username>
11+
<password>${env.GH_MAVEN_REGISTRY_ACCESS_TOKEN}</password>
12+
</server>
13+
</servers>
14+
</settings>

0 commit comments

Comments
 (0)