You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2023/12/21 15:01:40 UTC
(commons-net) branch master updated: Add conditional deploy step
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-net.git
The following commit(s) were added to refs/heads/master by this push:
new 5767e1d4 Add conditional deploy step
5767e1d4 is described below
commit 5767e1d436d1cdc5fdce21204af36e80e42b470e
Author: Sebb <se...@apache.org>
AuthorDate: Thu Dec 21 15:01:33 2023 +0000
Add conditional deploy step
---
.github/workflows/maven.yml | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index bff0dc50..e9889aa2 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -29,7 +29,7 @@ jobs:
java: [ 8, 11, 17, 21 ]
os: [ubuntu-latest]
experimental: [false]
- # Don't need
+ # Don't need to run all javas on all OSes
include:
- java: 8
os: macos-latest
@@ -37,6 +37,11 @@ jobs:
- java: 8
os: windows-latest
experimental: false
+ # Update java 8/ubuntu to add deploy step
+ - java: 8
+ os: ubuntu-latest
+ experimental: false
+ deploy: 'deploy' # (use string so it shows up in summary)
# include:
# - java: 22-ea
# experimental: true
@@ -57,6 +62,18 @@ jobs:
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- - name: Build with Maven
+ # these values cause the plugin to set up the Maven settings.xml file
+ server-id: apache.snapshots.https # Value of the distributionManagement/repository/id field of the pom.xml
+ server-username: NEXUS_USER # env variable for username in deploy
+ server-password: NEXUS_PW # env variable for token in deploy
+ - name: Build and test with Maven
run: mvn --show-version --batch-mode --no-transfer-progress -Ddoclint=all
# N.B. Add -Pslf4j-simple to enable logging above
+ - name: Deploy SNAPSHOT using minimal build
+ if: matrix.deploy
+ env:
+ NEXUS_USER: ${{ secrets.NEXUS_USER }}
+ NEXUS_PW: ${{ secrets.NEXUS_PW }}
+ run: >
+ mvn --show-version --batch-mode --no-transfer-progress deploy -Dgpg.skip
+ -DskipTests -Drat.skip -Djacoco.skip -Dcyclonedx.skip -Dspotbugs.skip -Dspdx.skip -Dpmd.skip