Skip to content

Commit 24c6569

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

File tree

4 files changed

+32
-73
lines changed

4 files changed

+32
-73
lines changed

.github/workflows/maven-deploy.yml

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

.github/workflows/maven-verify.yml

Lines changed: 4 additions & 8 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,11 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Set up JDK 1.8
19-
uses: actions/setup-java@v1
19+
uses: actions/setup-java@v3
2020
with:
21+
distribution: temurin
2122
java-version: 1.8
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
23+
cache: 'maven'
2824
- name: Verify with Maven
2925
run: |
3026
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
@@ -270,19 +270,6 @@
270270
</compilerArgs>
271271
</configuration>
272272
</plugin>
273-
<!-- Attach source jar to all builds. Runs during the package phase.-->
274-
<plugin>
275-
<groupId>org.apache.maven.plugins</groupId>
276-
<artifactId>maven-source-plugin</artifactId>
277-
<executions>
278-
<execution>
279-
<id>attach-sources</id>
280-
<goals>
281-
<goal>jar-no-fork</goal>
282-
</goals>
283-
</execution>
284-
</executions>
285-
</plugin>
286273
</plugins>
287274

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

0 commit comments

Comments
 (0)