Skip to content

Commit 2da25a3

Browse files
committed
Remove gpg, deploy workflow
Signed-off-by: Ricardo Zanini <[email protected]>
1 parent bbfb32c commit 2da25a3

File tree

4 files changed

+35
-75
lines changed

4 files changed

+35
-75
lines changed

.github/workflows/maven-deploy.yml

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

.github/workflows/maven-verify.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will build a Java project with Maven
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
33

4-
name: Verify SNAPSHOT
4+
name: Maven Verify
55

66
on:
77
push:
@@ -16,15 +16,12 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Set up JDK 11
19-
uses: actions/setup-java@v1
20-
with:
21-
java-version: 11
22-
- name: Cache Maven packages
23-
uses: actions/cache@v2
24-
with:
25-
path: ~/.m2
26-
key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml') }}
27-
restore-keys: ${{ runner.os }}-m2
19+
uses: actions/setup-java@v3
20+
with:
21+
distribution: temurin
22+
java-version: 11
23+
cache: 'maven'
24+
2825
- name: Verify with Maven
2926
run: |
3027
mvn -B -f pom.xml clean install verify

.github/workflows/release.yml

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ on:
55
types: [closed]
66
paths:
77
- '.github/project.yml'
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
defaults:
13+
run:
14+
shell: bash
815

916
jobs:
1017
release:
@@ -34,14 +41,10 @@ jobs:
3441
with:
3542
distribution: temurin
3643
java-version: 11
37-
38-
- name: Cache local Maven repository
39-
uses: actions/cache@v3
40-
with:
41-
path: ~/.m2/repository
42-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
43-
restore-keys: |
44-
${{ runner.os }}-maven-
44+
cache: 'maven'
45+
server-id: ossrh
46+
server-username: MAVEN_USERNAME
47+
server-password: MAVEN_PASSWORD
4548

4649
- name: Configure Git author
4750
run: |
@@ -50,22 +53,13 @@ jobs:
5053
5154
- name: Maven release ${{steps.metadata.outputs.current-version}}
5255
run: |
53-
gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.GPG_PASSPHRASE}}" --output /tmp/maven-settings.xml .github/release/maven-settings.xml.gpg
54-
git checkout -b release
55-
mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} -s /tmp/maven-settings.xml
56-
git checkout ${{github.base_ref}}
57-
git rebase release
58-
mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease -s /tmp/maven-settings.xml
56+
mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
57+
mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease
58+
env:
59+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
60+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
5961

60-
- name: Push changes to ${{github.base_ref}}
61-
uses: ad-m/[email protected]
62-
with:
63-
github_token: ${{ secrets.GITHUB_TOKEN }}
64-
branch: ${{github.base_ref}}
65-
66-
- name: Push tags
67-
uses: ad-m/[email protected]
68-
with:
69-
github_token: ${{ secrets.GITHUB_TOKEN }}
70-
tags: true
71-
branch: ${{github.base_ref}}
62+
- name: Push changes to ${{github.base_ref}} branch
63+
run: |
64+
git push
65+
git push origin ${{steps.metadata.outputs.current-version}}

pom.xml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -269,19 +269,6 @@
269269
</compilerArgs>
270270
</configuration>
271271
</plugin>
272-
<!-- Attach source jar to all builds. Runs during the package phase.-->
273-
<plugin>
274-
<groupId>org.apache.maven.plugins</groupId>
275-
<artifactId>maven-source-plugin</artifactId>
276-
<executions>
277-
<execution>
278-
<id>attach-sources</id>
279-
<goals>
280-
<goal>jar-no-fork</goal>
281-
</goals>
282-
</execution>
283-
</executions>
284-
</plugin>
285272
</plugins>
286273

287274
<pluginManagement>
@@ -325,6 +312,14 @@
325312
<groupId>org.apache.maven.plugins</groupId>
326313
<artifactId>maven-source-plugin</artifactId>
327314
<version>${version.source.plugin}</version>
315+
<executions>
316+
<execution>
317+
<id>attach-sources</id>
318+
<goals>
319+
<goal>jar-no-fork</goal>
320+
</goals>
321+
</execution>
322+
</executions>
328323
<configuration>
329324
<archive>
330325
<index>true</index>

0 commit comments

Comments
 (0)