Skip to content

Commit

Permalink
Merge branch 'hotfix/action'
Browse files Browse the repository at this point in the history
  • Loading branch information
Build Pipeline committed Sep 20, 2021
2 parents 555cc7c + 34ac374 commit f5e58b7
Show file tree
Hide file tree
Showing 5 changed files with 227 additions and 203 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
name: Maven Package

on:
workflow_dispatch:
release:
types:
- published
Expand All @@ -19,8 +20,13 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Build with Maven
- name: GPG Setup
env:
GPG_KEY_BASE64: ${{ secrets.GPG_KEY_BASE64 }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: ./gpg-setup.sh
- name: Deploy to OSS Sonatype
env:
SONATYPE_PASSWORD: ${{ secrets.SonatypePassword }}
run: mvn -B deploy --file pom.xml -s settings-template.xml
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSS_SONATYPE_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
run: mvn -B -Prelease source:jar javadoc:jar deploy --file pom.xml -s settings-template.xml -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
9 changes: 9 additions & 0 deletions gpg-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

#
# Prepare GPG Key is expected to be in base64
# Exported with gpg -a --export-secret-keys "your@email" | base64 > gpg.base64
#
printf "$GPG_KEY_BASE64" | base64 --decode > gpg.asc
echo ${GPG_PASSPHRASE} | gpg --batch --yes --passphrase-fd 0 --import gpg.asc
gpg -k
Loading

0 comments on commit f5e58b7

Please sign in to comment.