Skip to content

Commit

Permalink
Added settings.xml to ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbalakirev authored Aug 28, 2024
1 parent e42aeb3 commit b7d9c30
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,32 @@ jobs:
uses: actions/download-artifact@v3
with:
name: maven-artifacts


- name: Create Maven settings.xml
run: |
mkdir -p ~/.m2
echo '<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/SETTINGS/1.0.0/settings.xsd">
<servers>
<server>
<id>central</id>
<username>${{ secrets.OSSRH_USERNAME }}</username>
<password>${{ secrets.OSSRH_PASSWORD }}</password>
</server>
</servers>
<profiles>
<profile>
<id>release</id>
<properties>
<gpg.version>2.2.27</gpg.version>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>release</activeProfile>
</activeProfiles>
</settings>' > ~/.m2/settings.xml
- name: Setup Java
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -144,5 +169,5 @@ jobs:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: mvn deploy -DskipTests -DskipInstall -P release
run: mvn deploy -DskipTests -DskipInstall -P release --settings ~/.m2/settings.xml

0 comments on commit b7d9c30

Please sign in to comment.