Skip to content

Commit

Permalink
🚀 bump 2.7.1 and alt deploy #25
Browse files Browse the repository at this point in the history
  • Loading branch information
trydofor committed Feb 18, 2024
1 parent 3ba7bce commit 35e711a
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 11 deletions.
50 changes: 41 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ on:
type: boolean
required: false
deployOssrh:
description: 'deploy to ossrh?'
description: 'deploy to oss-repo?'
default: true
type: boolean
required: false
deployAltrh:
description: 'deploy to alt-repo?'
default: true
type: boolean
required: false
Expand Down Expand Up @@ -101,8 +106,12 @@ jobs:
echo "MVN_COVERAGE=$_cov" >> "$GITHUB_OUTPUT"
_drh=${{ inputs.deployOssrh || github.event_name == 'release' }}
echo "- MVN_DEPLOYRH=$_drh" >> "$GITHUB_STEP_SUMMARY"
echo "MVN_DEPLOYRH=$_drh" >> "$GITHUB_OUTPUT"
echo "- MVN_DEPLOY_OSSRH=$_drh" >> "$GITHUB_STEP_SUMMARY"
echo "MVN_DEPLOY_OSSRH=$_drh" >> "$GITHUB_OUTPUT"
_drp=${{ ( inputs.deployAltrh || github.event_name == 'release' ) && secrets.MVN_ALT_USER != '' }}
echo "- MVN_DEPLOY_ALTRH=$_drp" >> "$GITHUB_STEP_SUMMARY"
echo "MVN_DEPLOY_ALTRH=$_drp" >> "$GITHUB_OUTPUT"
_qod=${{ inputs.applyQodanaScan || 'false' }}
echo "- QODANA_SCAN=$_qod" >> "$GITHUB_STEP_SUMMARY"
Expand All @@ -125,6 +134,11 @@ jobs:
<username>${MVN_OSS_USER}</username>
<password>${MVN_OSS_PASS}</password>
</server>
<server>
<id>altrh</id>
<username>${MVN_ALT_USER}</username>
<password>${MVN_ALT_PASS}</password>
</server>
</servers>
</settings>
EOF
Expand All @@ -151,23 +165,41 @@ jobs:

## import gpp private key
- name: Import GPG key
if: steps.settings.outputs.MVN_DEPLOYRH == 'true'
if: steps.settings.outputs.MVN_DEPLOY_OSSRH == 'true' || steps.settings.outputs.MVN_DEPLOY_ALTRH == 'true'
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.MVN_GPG_SKEY }}
passphrase: ${{ secrets.MVN_GPG_PASS }}

## maven deploy
- name: Deploy ${{ steps.settings.outputs.WINGS_VERSION }} ${{ steps.settings.outputs.GIT_BRANCH }}
if: steps.settings.outputs.MVN_DEPLOYRH == 'true'
## maven deploy ossrh
- name: Deploy OSS ${{ steps.settings.outputs.WINGS_VERSION }} ${{ steps.settings.outputs.GIT_BRANCH }}
if: steps.settings.outputs.MVN_DEPLOY_OSSRH == 'true'
run: >
mvn
-P 'ossrh'
-P 'deploy,ossrh'
${{ steps.settings.outputs.MVN_REVISION }}
-Dgpg.passphrase=${MVN_GPG_PASS}
clean deploy
deploy
env:
JAVA_HOME: ${{ steps.settings.outputs.JAVA_HOME }}
MVN_GPG_PASS: ${{ secrets.MVN_GPG_PASS }}
MVN_OSS_USER: ${{ secrets.MVN_OSS_USER }}
MVN_OSS_PASS: ${{ secrets.MVN_OSS_PASS }}

## maven deploy altrh
- name: Deploy ALT ${{ steps.settings.outputs.WINGS_VERSION }} ${{ steps.settings.outputs.GIT_BRANCH }}
if: steps.settings.outputs.MVN_DEPLOY_ALTRH == 'true'
run: >
mvn
-P 'deploy,altrh'
${{ steps.settings.outputs.MVN_REVISION }}
-Dgpg.passphrase=${MVN_GPG_PASS}
deploy
env:
JAVA_HOME: ${{ steps.settings.outputs.JAVA_HOME }}
MVN_GPG_PASS: ${{ secrets.MVN_GPG_PASS }}
## export MVN_ALT_REPO=https://packages.trydofor.com/maven/repository/devops/
MVN_ALT_USER: ${{ secrets.MVN_ALT_USER }}
MVN_ALT_PASS: ${{ secrets.MVN_ALT_PASS }}
MVN_ALT_REPO: ${{ secrets.MVN_ALT_REPO }}
MVN_ALT_SNAP: ${{ secrets.MVN_ALT_SNAP }}
32 changes: 30 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</issueManagement>

<properties>
<revision>2.7.0-SNAPSHOT</revision>
<revision>2.7.1-SNAPSHOT</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
Expand Down Expand Up @@ -336,7 +336,7 @@
</build>
</profile>
<profile>
<id>ossrh</id>
<id>deploy</id>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
Expand All @@ -359,6 +359,13 @@
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>ossrh</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
Expand All @@ -384,5 +391,26 @@
</repository>
</distributionManagement>
</profile>
<profile>
<id>altrh</id>
<properties>
<!--suppress UnresolvedMavenProperty -->
<altReleaseDeploymentRepository>altrh::${MVN_ALT_REPO}</altReleaseDeploymentRepository>
<!--suppress UnresolvedMavenProperty -->
<altSnapshotDeploymentRepository>altrh::${MVN_ALT_SNAP}</altSnapshotDeploymentRepository>
</properties>
<repositories>
<repository>
<id>altrh-repo</id>
<!--suppress UnresolvedMavenProperty -->
<url>${MVN_ALT_REPO}</url>
</repository>
<repository>
<id>altrh-snap</id>
<!--suppress UnresolvedMavenProperty -->
<url>${MVN_ALT_SNAP}</url>
</repository>
</repositories>
</profile>
</profiles>
</project>

0 comments on commit 35e711a

Please sign in to comment.