Compare commits
10 Commits
e1f2641cd8
...
2de5737056
| Author | SHA1 | Date | |
|---|---|---|---|
| 2de5737056 | |||
| d26d29b1ab | |||
| a384954877 | |||
| 665e349d49 | |||
| fc4c25a25a | |||
| bdb04da80e | |||
| 10666caee1 | |||
| a68804ce78 | |||
| bc9af7598d | |||
| 016b022462 |
69
.github/workflows/build-and-publish-release.yml
vendored
69
.github/workflows/build-and-publish-release.yml
vendored
@@ -5,6 +5,13 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
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 }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-publish:
|
build-and-publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -18,45 +25,55 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-java@v4.2.2
|
- uses: actions/setup-java@v4.2.2
|
||||||
|
if: ${{ hashFiles('**/pom.xml') }}
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
|
||||||
java-version: 17
|
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: Config Git
|
- name: Config Git
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "edward@cheng.sydney"
|
git config --global user.email "edward@cheng.sydney"
|
||||||
git config --global user.name "3dwardch3ng"
|
git config --global user.name "3dwardch3ng"
|
||||||
git config --global core.autocrlf input
|
git config --global core.autocrlf input
|
||||||
- name: Start release
|
- name: Start release
|
||||||
env:
|
|
||||||
NEXUS_USERNAME: 'edward'
|
|
||||||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
|
||||||
SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }}
|
|
||||||
RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }}
|
|
||||||
run: |
|
run: |
|
||||||
mvn gitflow:release-start -B -DpushRemote=true -DallowSnapshots=true \
|
mvn gitflow:release-start -B -DpushRemote=true -DallowSnapshots=true -P homelab
|
||||||
-P homelab \
|
|
||||||
--settings=${{ github.workspace }}/.mvn/settings.xml
|
|
||||||
- name: Maven Publish
|
- name: Maven Publish
|
||||||
env:
|
|
||||||
GITHUB_ACTOR: '3dwardch3ng'
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
||||||
NEXUS_USERNAME: 'edward'
|
|
||||||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
|
||||||
SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }}
|
|
||||||
RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }}
|
|
||||||
run: |
|
run: |
|
||||||
mvn -B deploy \
|
mvn -B deploy -P homelab
|
||||||
-P homelab \
|
|
||||||
--settings=${{ github.workspace }}/.mvn/settings.xml
|
|
||||||
- name: Finish release
|
- name: Finish release
|
||||||
env:
|
env:
|
||||||
GITHUB_ACTOR: 3dwardch3ng
|
GITHUB_ACTOR: 3dwardch3ng
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
NEXUS_USERNAME: 'edward'
|
|
||||||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
|
||||||
SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }}
|
|
||||||
RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }}
|
|
||||||
run: |
|
run: |
|
||||||
mvn gitflow:release-finish -B -DpushRemote=true -DallowSnapshots=true \
|
mvn gitflow:release-finish -B -DpushRemote=true -DallowSnapshots=true -P homelab
|
||||||
-P homelab \
|
|
||||||
--settings=${{ github.workspace }}/.mvn/settings.xml
|
|
||||||
39
.github/workflows/build-and-publish-snapshot.yml
vendored
39
.github/workflows/build-and-publish-snapshot.yml
vendored
@@ -18,16 +18,47 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-java@v4.2.2
|
- uses: actions/setup-java@v4.2.2
|
||||||
|
if: ${{ hashFiles('**/pom.xml') }}
|
||||||
with:
|
with:
|
||||||
distribution: zulu
|
|
||||||
java-version: 17
|
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
|
- name: Maven Publish
|
||||||
env:
|
env:
|
||||||
NEXUS_USERNAME: 'edward'
|
NEXUS_USERNAME: 'edward'
|
||||||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
||||||
|
MAVEN_PUBLIC_REPOSITORY_URL: ${{ secrets.MAVEN_PUBLIC_REPOSITORY_URL }}
|
||||||
SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }}
|
SNAPSHOT_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL }}
|
||||||
RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }}
|
RELEASE_DEPLOYMENT_REPOSITORY_URL: ${{ secrets.RELEASE_DEPLOYMENT_REPOSITORY_URL }}
|
||||||
run: |
|
run: |
|
||||||
mvn -B deploy \
|
mvn -B deploy -P homelab
|
||||||
-P homelab \
|
|
||||||
--settings=${{ github.workspace }}/.mvn/settings.xml
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
<settings>
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>homelab</id>
|
|
||||||
<properties>
|
|
||||||
<altSnapshotDeploymentRepository>nexus-snapshot::${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL}</altSnapshotDeploymentRepository>
|
|
||||||
<altReleaseDeploymentRepository>nexus-release::${env.RELEASE_DEPLOYMENT_REPOSITORY_URL}</altReleaseDeploymentRepository>
|
|
||||||
</properties>
|
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<id>nexus-snapshot</id>
|
|
||||||
<name>Home Lab Nexus Snapshot</name>
|
|
||||||
<releases>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
<updatePolicy>always</updatePolicy>
|
|
||||||
<checksumPolicy>warn</checksumPolicy>
|
|
||||||
</snapshots>
|
|
||||||
<url>${env.SNAPSHOT_DEPLOYMENT_REPOSITORY_URL}</url>
|
|
||||||
<layout>default</layout>
|
|
||||||
</repository>
|
|
||||||
<repository>
|
|
||||||
<id>nexus-release</id>
|
|
||||||
<name>Home Lab Nexus Release</name>
|
|
||||||
<releases>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
<updatePolicy>always</updatePolicy>
|
|
||||||
<checksumPolicy>warn</checksumPolicy>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</snapshots>
|
|
||||||
<url>${env.RELEASE_DEPLOYMENT_REPOSITORY_URL}</url>
|
|
||||||
<layout>default</layout>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
<servers>
|
|
||||||
<server>
|
|
||||||
<id>nexus-snapshot</id>
|
|
||||||
<username>${env.NEXUS_USERNAME}</username>
|
|
||||||
<password>${env.NEXUS_PASSWORD}</password>
|
|
||||||
</server>
|
|
||||||
<server>
|
|
||||||
<id>nexus-release</id>
|
|
||||||
<username>${env.NEXUS_USERNAME}</username>
|
|
||||||
<password>${env.NEXUS_PASSWORD}</password>
|
|
||||||
</server>
|
|
||||||
</servers>
|
|
||||||
</settings>
|
|
||||||
12
pom.xml
12
pom.xml
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>sydney.cheng</groupId>
|
<groupId>sydney.cheng</groupId>
|
||||||
<artifactId>ec-super-pom</artifactId>
|
<artifactId>ec-super-pom</artifactId>
|
||||||
<version>1.0.2</version>
|
<version>1.0.4-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>ec-super-pom</name>
|
<name>ec-super-pom</name>
|
||||||
|
|
||||||
@@ -62,6 +62,7 @@
|
|||||||
<maven-project-info-reports-plugin.version>3.7.0</maven-project-info-reports-plugin.version>
|
<maven-project-info-reports-plugin.version>3.7.0</maven-project-info-reports-plugin.version>
|
||||||
<maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
|
<maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
|
||||||
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
|
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
|
||||||
|
<spring-boot-maven-plugin.version>3.3.3</spring-boot-maven-plugin.version>
|
||||||
<sonar-maven-plugin.version>4.0.0.4121</sonar-maven-plugin.version>
|
<sonar-maven-plugin.version>4.0.0.4121</sonar-maven-plugin.version>
|
||||||
<properties-maven-plugin.version>1.2.1</properties-maven-plugin.version>
|
<properties-maven-plugin.version>1.2.1</properties-maven-plugin.version>
|
||||||
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
|
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
|
||||||
@@ -215,6 +216,11 @@
|
|||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
<version>${jacoco-maven-plugin.version}</version>
|
<version>${jacoco-maven-plugin.version}</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>${spring-boot-maven-plugin.version}</version>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.sonarsource.scanner.maven</groupId>
|
<groupId>org.sonarsource.scanner.maven</groupId>
|
||||||
<artifactId>sonar-maven-plugin</artifactId>
|
<artifactId>sonar-maven-plugin</artifactId>
|
||||||
@@ -250,10 +256,6 @@
|
|||||||
</commitMessages>
|
</commitMessages>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
</build>
|
</build>
|
||||||
|
|||||||
Reference in New Issue
Block a user