Skip to content

Commit 9117a4f

Browse files
committed
test new release workflow
1 parent 60b2317 commit 9117a4f

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release
2+
on:
3+
milestone:
4+
types: [closed]
5+
jobs:
6+
build:
7+
name: Release ${{ github.event.milestone.title }}
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
with:
13+
ref: master
14+
fetch-depth: 0
15+
- name: Set up Git
16+
run: |
17+
git config user.name "Zonky Bot"
18+
git config user.email "bot@zonky.com"
19+
- name: Set up JDK
20+
uses: actions/setup-java@v2
21+
with:
22+
distribution: 'zulu'
23+
java-version: 8
24+
server-id: ossrh
25+
server-username: MAVEN_USER
26+
server-password: MAVEN_PASS
27+
- name: Prepare signing certificate
28+
env:
29+
PUB_CERT: ${{ secrets.PUB_CERT }}
30+
SIGNING_CERT: ${{ secrets.SIGNING_CERT }}
31+
run: |
32+
mkdir $RUNNER_TEMP/.gnupg
33+
echo -n $PUB_CERT | base64 --decode > $RUNNER_TEMP/.gnupg/pubring.gpg
34+
echo -n $SIGNING_CERT | base64 --decode > $RUNNER_TEMP/.gnupg/secring.gpg
35+
- name: Release with Maven
36+
env:
37+
RELEASE_VERSION: ${{ github.event.milestone.title }}
38+
MAVEN_USER: ${{ secrets.MAVEN_USER }}
39+
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
40+
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
41+
SIGNING_PASS: ${{ secrets.SIGNING_PASS }}
42+
run: |
43+
mvn -B release:prepare release:perform \
44+
-DreleaseVersion=$RELEASE_VERSION \
45+
-Darguments="-Dgpg.defaultKeyring=false \
46+
-Dgpg.keyname=$SIGNING_KEY_ID \
47+
-Dgpg.passphrase=$SIGNING_PASS \
48+
-Dgpg.homedir=$RUNNER_TEMP/.gnupg"
49+
- name: Clean up signing certificate
50+
run: rm -rf $RUNNER_TEMP/.gnupg

0 commit comments

Comments
 (0)