Skip to content

Commit f5e58b7

Browse files
author
Build Pipeline
committed
Merge branch 'hotfix/action'
2 parents 555cc7c + 34ac374 commit f5e58b7

File tree

5 files changed

+227
-203
lines changed

5 files changed

+227
-203
lines changed

.github/workflows/maven-publish.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
name: Maven Package
55

66
on:
7+
workflow_dispatch:
78
release:
89
types:
910
- published
@@ -19,8 +20,13 @@ jobs:
1920
uses: actions/setup-java@v1
2021
with:
2122
java-version: 1.8
22-
23-
- name: Build with Maven
23+
- name: GPG Setup
24+
env:
25+
GPG_KEY_BASE64: ${{ secrets.GPG_KEY_BASE64 }}
26+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
27+
run: ./gpg-setup.sh
28+
- name: Deploy to OSS Sonatype
2429
env:
25-
SONATYPE_PASSWORD: ${{ secrets.SonatypePassword }}
26-
run: mvn -B deploy --file pom.xml -s settings-template.xml
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
OSS_SONATYPE_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
32+
run: mvn -B -Prelease source:jar javadoc:jar deploy --file pom.xml -s settings-template.xml -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}

gpg-setup.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
#
4+
# Prepare GPG Key is expected to be in base64
5+
# Exported with gpg -a --export-secret-keys "your@email" | base64 > gpg.base64
6+
#
7+
printf "$GPG_KEY_BASE64" | base64 --decode > gpg.asc
8+
echo ${GPG_PASSPHRASE} | gpg --batch --yes --passphrase-fd 0 --import gpg.asc
9+
gpg -k

0 commit comments

Comments
 (0)