Skip to content

Commit 2517870

Browse files
Merge pull request #10 from gabriel-logan/main
chore: Update Maven publish workflow to use local settings file
2 parents ae27360 + 756fdf0 commit 2517870

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed

.github/workflows/maven-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ jobs:
3131
run: mvn -B package --file pom.xml
3232

3333
- name: Publish to GitHub Packages Apache Maven
34-
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
34+
run: mvn deploy -s settings.xml
3535
env:
36-
GITHUB_TOKEN: ${{ github.token }}
36+
GITHUB_TOKEN: ${{ secrets.MULTIFORM_VALIDATOR_MVN_TOKEN_GITHUB_PACKAGES }}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.github</groupId>
88
<artifactId>multiform-validator</artifactId>
9-
<version>0.0.1</version>
9+
<version>0.0.2</version>
1010

1111
<name>Multiform Validator</name>
1212
<description>

settings.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
http://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
6+
<activeProfiles>
7+
<activeProfile>github</activeProfile>
8+
</activeProfiles>
9+
10+
<profiles>
11+
<profile>
12+
<id>github</id>
13+
<repositories>
14+
<repository>
15+
<id>central</id>
16+
<url>https://repo1.maven.org/maven2</url>
17+
</repository>
18+
<repository>
19+
<id>github</id>
20+
<url>https://maven.pkg.github.com/multiform-validator/java</url>
21+
<snapshots>
22+
<enabled>true</enabled>
23+
</snapshots>
24+
</repository>
25+
</repositories>
26+
</profile>
27+
</profiles>
28+
29+
<servers>
30+
<server>
31+
<id>github</id>
32+
<username>gabriel-logan</username>
33+
<password>${env.GITHUB_TOKEN}</password>
34+
</server>
35+
</servers>
36+
</settings>

0 commit comments

Comments
 (0)