Skip to content

Commit 78eaee5

Browse files
authored
remove deploy and sign from workflow (#417)
1 parent 80d40e1 commit 78eaee5

File tree

3 files changed

+7
-38
lines changed

3 files changed

+7
-38
lines changed

.github/actions/setup-jdk/action.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,3 @@ runs:
88
with:
99
java-version: 17
1010
distribution: adopt
11-
server-id: ossrh
12-
server-username: MAVEN_USERNAME
13-
server-password: MAVEN_PASSWORD

.github/workflows/release.yaml

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
11
name: release
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
GPG_PRIVATE_KEY:
7-
description: 'The private key to sign the artifacts'
8-
required: true
9-
type: string
10-
OSSRH_USERNAME:
11-
description: 'The username to deploy to Maven Central'
12-
required: true
13-
type: string
14-
OSSRH_TOKEN:
15-
description: 'The token to deploy to Maven Central'
16-
required: true
17-
type: string
4+
workflow_dispatch: { }
185

196
jobs:
207
build_and_deploy:
@@ -31,18 +18,10 @@ jobs:
3118

3219
- name: Get the version
3320
id: get_version
34-
run: echo ::set-output name=version::$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
35-
36-
- name: Import GPG key
37-
run: echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --import
38-
env:
39-
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
21+
run: echo "VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
4022

4123
- name: Deploy
42-
run: ./mvnw -P release --batch-mode -DskipTests deploy
43-
env:
44-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
45-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
24+
run: ./mvnw -P release --batch-mode -DskipTests package
4625

4726
- name: Upload JARs as artifact
4827
uses: actions/upload-artifact@v2
@@ -58,17 +37,17 @@ jobs:
5837
- uses: ./.github/actions/setup-jdk
5938

6039
- name: Set version
61-
run: ./mvnw versions:set -DnewVersion=${{ steps.get_version.outputs.version }} -DgenerateBackupPoms=false
40+
run: ./mvnw versions:set -DnewVersion=${{ env.VERSION }} -DgenerateBackupPoms=false
6241

6342
- name: Update README.md
64-
run: sed -i "s|<version>.*</version>|<version>${{ steps.get_version.outputs.version }}</version>|g" README.md
43+
run: sed -i "s|<version>.*</version>|<version>${{ env.VERSION }}</version>|g" README.md
6544

6645
- name: Commit release POM and Tag
6746
run: |
6847
git config --local user.email "action@github.com"
6948
git config --local user.name "GitHub Action"
70-
git commit -m "Release ${{ steps.get_version.outputs.version }}" -a
71-
git tag ${{ steps.get_version.outputs.version }}
49+
git commit -m "Release ${{ env.VERSION }}" -a
50+
git tag ${{ env.VERSION }}
7251
7352
- name: Set next development version
7453
run: ./mvnw versions:set -DnextSnapshot=true -DgenerateBackupPoms=false

pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -741,12 +741,5 @@
741741
</plugins>
742742
</reporting>
743743

744-
<distributionManagement>
745-
<snapshotRepository>
746-
<id>ossrh</id>
747-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
748-
</snapshotRepository>
749-
</distributionManagement>
750-
751744
</project>
752745

0 commit comments

Comments
 (0)