Skip to content

Commit a38c2d2

Browse files
committed
Sign in deploy phase, clean before deploy
Signed-off-by: Todd Baert <[email protected]>
1 parent 56ca085 commit a38c2d2

File tree

2 files changed

+12
-30
lines changed

2 files changed

+12
-30
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,13 @@ jobs:
3636
- name: Configure GPG Key
3737
run: |
3838
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
39-
gpg --list-secret-keys --keyid-format LONG
4039
env:
4140
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
4241

43-
- name: Build with Maven
44-
run: |
45-
mvn --batch-mode --update-snapshots verify gpg:sign -Dversion.modifier=''
46-
ls
47-
ls *
48-
gpg --verify target/javasdk-0.1.0-sources.jar.asc target/javasdk-0.1.0-sources.jar
49-
50-
- name: Upload coverage to Codecov
51-
uses: codecov/codecov-action@v2
52-
with:
53-
token: ${{ secrets.CODECOV_TOKEN }}
54-
flags: unittests # optional
55-
name: coverage # optional
56-
fail_ci_if_error: true # optional (default = false)
57-
verbose: true # optional (default = false)
58-
5942
- name: Deploy
60-
run: |
61-
gpg --verify target/javasdk-0.1.0-sources.jar.asc target/javasdk-0.1.0-sources.jar
62-
mvn -P gpg_verify \
63-
--no-transfer-progress \
64-
--batch-mode \
65-
--file pom.xml -s release/m2-settings.xml deploy -Dversion.modifier=''
43+
run: |
44+
mvn --batch-mode \
45+
--settings release/m2-settings.xml clean deploy -Dversion.modifier=''
6646
env:
6747
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
6848
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

pom.xml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -285,17 +285,19 @@
285285
<!-- end source & javadoc -->
286286

287287
<!-- sign the jars -->
288-
<!-- see https://gist.github.com/sualeh/ae78dc16123899d7942bc38baba5203c -->
289288
<plugin>
290289
<groupId>org.apache.maven.plugins</groupId>
291290
<artifactId>maven-gpg-plugin</artifactId>
292-
<configuration>
293-
<gpgArguments>
294-
<arg>--pinentry-mode</arg>
295-
<arg>loopback</arg>
296-
</gpgArguments>
297-
</configuration>
298291
<version>1.5</version>
292+
<executions>
293+
<execution>
294+
<id>sign-artifacts</id>
295+
<phase>deploy</phase>
296+
<goals>
297+
<goal>sign</goal>
298+
</goals>
299+
</execution>
300+
</executions>
299301
</plugin>
300302
<!-- end sign -->
301303

0 commit comments

Comments
 (0)