Skip to content

Commit

Permalink
Merge pull request #10 from gabriel-logan/main
Browse files Browse the repository at this point in the history
chore: Update Maven publish workflow to use local settings file
  • Loading branch information
gabriel-logan authored Jul 9, 2024
2 parents ae27360 + 756fdf0 commit 2517870
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:
run: mvn -B package --file pom.xml

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
run: mvn deploy -s settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.MULTIFORM_VALIDATOR_MVN_TOKEN_GITHUB_PACKAGES }}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github</groupId>
<artifactId>multiform-validator</artifactId>
<version>0.0.1</version>
<version>0.0.2</version>

<name>Multiform Validator</name>
<description>
Expand Down
36 changes: 36 additions & 0 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">

<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>

<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/multiform-validator/java</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>

<servers>
<server>
<id>github</id>
<username>gabriel-logan</username>
<password>${env.GITHUB_TOKEN}</password>
</server>
</servers>
</settings>

0 comments on commit 2517870

Please sign in to comment.