Skip to content

Commit 4776911

Browse files
committed
[skip ci] CI automation
1 parent 3ce669b commit 4776911

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.github/generate_gpg_key.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env bash
2+
3+
pwd
4+
5+
rm -rf .gnupg
6+
mkdir -m 0700 .gnupg
7+
touch .gnupg/gpg.conf
8+
chmod 600 .gnupg/gpg.conf
9+
tail -n +4 /usr/share/gnupg2/gpg-conf.skel > .gnupg/gpg.conf
10+
11+
cd .gnupg
12+
13+
pwd
14+
15+
cat >keydetails <<EOF
16+
%echo Generating a basic OpenPGP key
17+
Key-Type: RSA
18+
Key-Length: 2048
19+
Subkey-Type: RSA
20+
Subkey-Length: 2048
21+
Name-Real: Łukasz Włódarczyk
22+
Name-Comment: kilmajster
23+
Name-Email: [email protected]
24+
Expire-Date: 0
25+
%no-ask-passphrase
26+
%no-protection
27+
%pubring pubring.kbx
28+
%secring trustdb.gpg
29+
# Do a commit here, so that we can later print "done" :-)
30+
%commit
31+
%echo done
32+
EOF
33+
34+
gpg2 --verbose --batch --gen-key keydetails

.github/workflows/publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
1919
- name: Set version from git tag
2020
run: mvn -B -ntp versions:set -DgenerateBackupPoms=false -DnewVersion="$TAG"
21+
- name: Generate GPG key
22+
run: sh ./.github/generate_gpg_key.sh
2123
- name: Publish package
2224
run: mvn -B -ntp deploy -s .github/ossrhSettings.xml -P ossrh
2325
env:

0 commit comments

Comments
 (0)