update pipelines

This commit is contained in:
2024-08-30 17:47:42 +10:00
parent a68804ce78
commit d26d29b1ab
4 changed files with 78 additions and 87 deletions

View File

@@ -18,16 +18,47 @@ jobs:
with:
fetch-depth: 0
- uses: actions/setup-java@v4.2.2
if: ${{ hashFiles('**/pom.xml') }}
with:
distribution: zulu
java-version: 17
distribution: zulu
cache: 'maven'
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v22
with:
profiles: >
[{
"id": "homelab",
"properties": {
"altSnapshotDeploymentRepository": "nexus-snapshot::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL}",
"altReleaseDeploymentRepository": "nexus-release::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL}"
}
}]
repositories: >
[{
"id": "maven-public",
"url": "${env.MAVEN_PUBLIC_REPOSITORY_URL}",
"snapshots": {
"enabled": "true"
}
}]
servers: >
[{
"id": "nexus-snapshot",
"username": "${env.NEXUS_USERNAME}",
"password": "${env.NEXUS_PASSWORD}"
},
{
"id": "nexus-release",
"username": "${env.NEXUS_USERNAME}",
"password": "${env.NEXUS_PASSWORD}"
}]
- name: Maven Publish
env:
NEXUS_USERNAME: 'edward'
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
MAVEN_PUBLIC_REPOSITORY_URL: ${{ secrets.MAVEN_PUBLIC_REPOSITORY_URL }}
SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }}
RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }}
run: |
mvn -B deploy \
-P homelab \
--settings=${{ github.workspace }}/.mvn/settings.xml
mvn -B deploy -P homelab