Skip to content

Commit f306797

Browse files
author
Artem Eroshenko
authored
fix release (via #223)
1 parent 18b2899 commit f306797

4 files changed

Lines changed: 37 additions & 13 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
build:
14-
name: "Build JDK 1.8"
14+
name: "Build"
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:

.github/workflows/publish.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish
1+
name: Publish Release
22

33
on:
44
release:
@@ -16,26 +16,26 @@ jobs:
1616
distribution: 'zulu'
1717
java-version: 8.0.x
1818

19-
- name: Set up GPG
20-
run: echo -n "${GPG_PRIVATE_KEY}" | base64 --decode > ${GITHUB_WORKSPACE}/${GPG_KEY_ID}.gpg
21-
env:
22-
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
23-
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
24-
2519
- name: Set up Maven
2620
uses: s4u/maven-settings-action@v2.4.1
2721
with:
2822
servers: '[{"id": "ossrh", "username": "${{secrets.OSSRH_USERNAME}}", "password": "${{secrets.OSSRH_PASSWORD}}"}]'
2923

24+
- name: Set up GPG
25+
run: |
26+
export GPG_TTY=$(tty)
27+
echo -n "${GPG_PRIVATE_KEY}" | base64 --decode | gpg --batch --import
28+
env:
29+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
30+
3031
- name: "Maven Build"
3132
run: ./mvnw -Dinvoker.skip=true install
3233

3334
- name: "Maven Publish"
3435
run: |
35-
./mvnw -Dinvoker.skip=true deploy \
36-
-Dsigning.keyId=${GPG_KEY_ID} \
37-
-Dsigning.password=${GPG_PASSPHRASE} \
38-
-Dsigning.secretKeyRingFile=${GITHUB_WORKSPACE}/${GPG_KEY_ID}.gpg
36+
./mvnw -Dinvoker.skip=true -Pgpg deploy \
37+
-Dgpg.keyname=${GPG_KEY_ID} \
38+
-Dgpg.passphrase=${GPG_PASSPHRASE} \
3939
env:
4040
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
4141
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Perform Release
22

33
on:
44
workflow_dispatch:

pom.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,30 @@
381381
</dependencies>
382382

383383
<profiles>
384+
<profile>
385+
<id>gpg</id>
386+
<activation>
387+
<activeByDefault>false</activeByDefault>
388+
</activation>
389+
<build>
390+
<plugins>
391+
<plugin>
392+
<groupId>org.apache.maven.plugins</groupId>
393+
<artifactId>maven-gpg-plugin</artifactId>
394+
<version>3.0.1</version>
395+
<executions>
396+
<execution>
397+
<id>sign-artifacts</id>
398+
<phase>verify</phase>
399+
<goals>
400+
<goal>sign</goal>
401+
</goals>
402+
</execution>
403+
</executions>
404+
</plugin>
405+
</plugins>
406+
</build>
407+
</profile>
384408
<profile>
385409
<id>it</id>
386410
<activation>

0 commit comments

Comments
 (0)