Skip to content

Commit f39124c

Browse files
authored
1 parent 14431d1 commit f39124c

File tree

7 files changed

+69
-327
lines changed

7 files changed

+69
-327
lines changed

.github/actions/deploy-release/action.yml

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ inputs:
88
password:
99
description: "The password used for the upload (technical user for maven central upload)"
1010
required: true
11-
profile:
12-
description: "The profile id"
13-
required: true
1411
pgp-pub-key:
1512
description: "The public pgp key ID"
1613
required: true
@@ -33,7 +30,6 @@ runs:
3330
- name: Echo Inputs
3431
run: |
3532
echo "user: ${{ inputs.user }}"
36-
echo "profile: ${{ inputs.profile }}"
3733
echo "revision: ${{ inputs.revision }}"
3834
shell: bash
3935

@@ -43,7 +39,7 @@ runs:
4339
distribution: sapmachine
4440
java-version: '17'
4541
cache: maven
46-
server-id: ossrh
42+
server-id: central
4743
server-username: MAVEN_CENTRAL_USER
4844
server-password: MAVEN_CENTRAL_PASSWORD
4945

@@ -59,36 +55,17 @@ runs:
5955
env:
6056
PASSPHRASE: ${{ inputs.pgp-passphrase }}
6157

62-
- name: Deploy Locally
58+
- name: Deploy to Maven Central
6359
run: >
64-
mvn -B -ntp -fae --show-version
65-
-Durl=file:./temp_local_repo
60+
mvn -B -ntp --show-version
6661
-Dmaven.install.skip=true
6762
-Dmaven.test.skip=true
6863
-Dgpg.passphrase="$GPG_PASSPHRASE"
6964
-Dgpg.keyname="$GPG_PUB_KEY"
70-
-Drevision="${{ inputs.revision }}"
71-
deploy
72-
working-directory: ./deploy-oss
65+
clean deploy
7366
shell: bash
7467
env:
7568
MAVEN_CENTRAL_USER: ${{ inputs.user }}
7669
MAVEN_CENTRAL_PASSWORD: ${{ inputs.password }}
7770
GPG_PASSPHRASE: ${{ inputs.pgp-passphrase }}
7871
GPG_PUB_KEY: ${{ inputs.pgp-pub-key }}
79-
80-
- name: Deploy Staging
81-
run: >
82-
mvn -B -ntp -fae --show-version
83-
org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:deploy-staged-repository
84-
-DserverId=ossrh
85-
-DnexusUrl=https://oss.sonatype.org
86-
-DrepositoryDirectory=./temp_local_repo
87-
-DstagingProfileId="$MAVEN_CENTRAL_PROFILE_ID"
88-
-Drevision="${{ inputs.revision }}"
89-
working-directory: ./deploy-oss
90-
shell: bash
91-
env:
92-
MAVEN_CENTRAL_USER: ${{ inputs.user }}
93-
MAVEN_CENTRAL_PASSWORD: ${{ inputs.password }}
94-
MAVEN_CENTRAL_PROFILE_ID: ${{ inputs.profile }}

.github/actions/deploy/action.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/actions/newrelease/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ runs:
3030
mvn --no-transfer-progress versions:set-property -Dproperty=revision -DnewVersion=$VERSION
3131
git config --global user.name 'github-actions[bot]'
3232
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
33-
git checkout -b main
33+
git checkout -B main
3434
git commit -am "Update version to $VERSION"
3535
git push --set-upstream origin main
36-
shell: bash
36+
shell: bash
Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy to OSS
1+
name: Deploy to Maven Central
22

33
env:
44
JAVA_VERSION: '17'
@@ -9,36 +9,33 @@ on:
99
types: [ "released" ]
1010

1111
jobs:
12-
13-
# blackduck:
14-
# name: "Blackduck Scan"
15-
# runs-on: ubuntu-latest
16-
# timeout-minutes: 15
17-
# steps:
18-
# - name: Checkout
19-
# uses: actions/checkout@v4
20-
# - name: "Scan With Black Duck"
21-
# uses: ./.github/actions/scan-with-blackduck
22-
# with:
23-
# blackduck_token: ${{ secrets.BLACK_DUCK_TOKEN }}
24-
# github_token: ${{ secrets.GITHUB_TOKEN }}
25-
# maven-version: ${{ env.MAVEN_VERSION }}
12+
#blackduck:
13+
# name: Blackduck Scan
14+
# runs-on: ubuntu-latest
15+
# timeout-minutes: 15
16+
# steps:
17+
# - name: Checkout
18+
# uses: actions/checkout@v4
19+
# - name: Scan With Black Duck
20+
# uses: ./.github/actions/scan-with-blackduck
21+
# with:
22+
# blackduck_token: ${{ secrets.BLACK_DUCK_TOKEN }}
23+
# github_token: ${{ secrets.GITHUB_TOKEN }}
24+
# maven-version: ${{ env.MAVEN_VERSION }}
2625

2726
update-version:
27+
name: Update Version
2828
runs-on: ubuntu-latest
29-
# needs: blackduck
3029
steps:
3130
- name: Checkout
3231
uses: actions/checkout@v4
33-
#with:
34-
# token: ${{ secrets.GH_TOKEN }}
35-
36-
#- name: Update version
37-
# uses: ./.github/actions/newrelease
38-
# with:
39-
# java-version: ${{ env.JAVA_VERSION }}
40-
# maven-version: ${{ env.MAVEN_VERSION }}
41-
32+
with:
33+
token: ${{ secrets.GH_TOKEN }}
34+
- name: Update version
35+
uses: ./.github/actions/newrelease
36+
with:
37+
java-version: ${{ env.JAVA_VERSION }}
38+
maven-version: ${{ env.MAVEN_VERSION }}
4239
- name: Upload Changed Artifacts
4340
uses: actions/upload-artifact@v4
4441
with:
@@ -48,28 +45,27 @@ jobs:
4845
retention-days: 1
4946

5047
build:
48+
#name: Build and Sonar Scan
49+
name: Build
5150
runs-on: ubuntu-latest
5251
needs: update-version
5352
steps:
5453
- name: Download artifact
5554
uses: actions/download-artifact@v4
5655
with:
5756
name: root-new-version
58-
5957
- name: Build
6058
uses: ./.github/actions/build
6159
with:
6260
java-version: ${{ env.JAVA_VERSION }}
6361
maven-version: ${{ env.MAVEN_VERSION }}
64-
65-
#- name: SonarQube Scan
62+
#- name: Sonar Scan
6663
# uses: ./.github/actions/scan-with-sonar
6764
# with:
6865
# java-version: ${{ env.JAVA_VERSION }}
6966
# maven-version: ${{ env.MAVEN_VERSION }}
7067
# sonarq-token: ${{ secrets.SONARQ_TOKEN }}
7168
# github-token: ${{ secrets.GITHUB_TOKEN }}
72-
7369
- name: Upload Changed Artifacts
7470
uses: actions/upload-artifact@v4
7571
with:
@@ -81,24 +77,22 @@ jobs:
8177
deploy:
8278
name: Deploy to Maven Central
8379
runs-on: ubuntu-latest
84-
needs: build
80+
#needs: [blackduck, build]
81+
needs: [build]
8582
steps:
8683
- name: Download artifact
8784
uses: actions/download-artifact@v4
8885
with:
8986
name: root-build
90-
9187
- name: Deploy
9288
uses: ./.github/actions/deploy-release
9389
with:
94-
user: ${{ secrets.OSSRH_SONATYPE_ORG_API_USER }}
95-
password: ${{ secrets.OSSRH_SONATYPE_ORG_API_PASSWD }}
96-
profile: ${{ secrets.OSSRH_SONATYPE_ORG_PROFILE_ID }}
90+
user: ${{ secrets.CENTRAL_REPOSITORY_USER }}
91+
password: ${{ secrets.CENTRAL_REPOSITORY_PASS }}
9792
pgp-pub-key: ${{ secrets.PGP_PUBKEY_ID }}
9893
pgp-private-key: ${{ secrets.PGP_PRIVATE_KEY }}
9994
pgp-passphrase: ${{ secrets.PGP_PASSPHRASE }}
10095
revision: ${{ github.event.release.tag_name }}
10196
maven-version: ${{ env.MAVEN_VERSION }}
102-
10397
- name: Echo Status
10498
run: echo "The job status is ${{ job.status }}"

.github/workflows/main-build-and-deploy.yml

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)