Skip to content

Commit

Permalink
fix(pom): Fix repo location in workflow as well
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelsJP committed Sep 25, 2023
1 parent e4831c6 commit a3a4013
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/push-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,29 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml', '**/package.json') }}
restore-keys: |
${{ runner.os}}-node_modules-
- uses: s4u/[email protected]
with:
servers: |
[{
"id": "heigit-nexus-snapshots",
"username": "${{ secrets.NEXUS_USERNAME }}",
"password": "${{ secrets.NEXUS_PASSWORD }}"
}, {
"id": "heigit-nexus-releases",
"username": "${{ secrets.NEXUS_USERNAME }}",
"password": "${{ secrets.NEXUS_PASSWORD }}"
}]
- name: Build and publish package on snapshot
if: github.event_name == 'push' && github.event_name != 'release'
run: |
mvn -B -DskipTests source:jar deploy
mvn -B -DskipTests -Pskip-shaded-web-jar -Pskip-tools-jar source:jar deploy
env:
RT_USERNAME: ${{ secrets.RT_USERNAME }}
RT_PASSWORD: ${{ secrets.RT_PASSWORD }}
NEXUS_BASE_URL: ${{ vars.NEXUS_BASE_URL }}
# Write a task to publish the package to GitHub Packages when a release is published
- name: Build and publish package on release
if: github.event_name == 'release'
run: |
mvn versions:set -DnewVersion=${{ github.event.release.tag_name }} -DgenerateBackupPoms=false
mvn -B -DskipTests source:jar deploy
mvn -B -DskipTests -Pskip-shaded-web-jar -Pskip-tools-jar source:jar deploy
env:
RT_USERNAME: ${{ secrets.RT_USERNAME }}
RT_PASSWORD: ${{ secrets.RT_PASSWORD }}
NEXUS_BASE_URL: ${{ vars.NEXUS_BASE_URL }}
17 changes: 6 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -306,20 +306,15 @@
</build>

<distributionManagement>
<downloadUrl>https://repo.heigit.org/artifactory/</downloadUrl>
<repository>
<id>releases</id>
<name>HeiGIT repository</name>
<uniqueVersion>false</uniqueVersion>
<url>https://repo.heigit.org/artifactory/libs-release-local</url>
<layout>default</layout>
<id>heigit-nexus-releases</id>
<name>HeiGIT Releases</name>
<url>${env.NEXUS_BASE_URL}/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>HeiGIT repository (snapshots)</name>
<uniqueVersion>true</uniqueVersion>
<url>https://repo.heigit.org/artifactory/libs-snapshot-local</url>
<layout>default</layout>
<id>heigit-nexus-snapshots</id>
<name>HeiGIT Snapshots</name>
<url>${env.NEXUS_BASE_URL}/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>

Expand Down

0 comments on commit a3a4013

Please sign in to comment.