Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
bsorrentino committed Nov 11, 2020
2 parents 89cef33 + dc5b046 commit b7409db
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path

name: Deploy JDK8 version

on: workflow_dispatch
# push:
# branches: [ support/4.x-jdk8 ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- 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.SONATYPE_PASSWORD }}
# mvn -Prelease source:jar javadoc:jar deploy -Dgpg.passphrase=thephrase
run: mvn -B -Prelease source:jar javadoc:jar deploy --file pom.xml -s settings-template.xml -Dgpg.passphrase=${{ secrets.SONATYPE_PASSWORD }}

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
45 changes: 45 additions & 0 deletions settings-template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<!--
enabled Whether to use this repository for downloading this type
of artifact. updatePolicy The frequency for downloading updates - can be
"always", "daily" (default), "interval:XXX" (in minutes) or "never" (only
if it doesn't exist locally). checksumPolicy What to do when verification
of an artifact checksum fails - warn, fail, etc. Valid values are "fail"
or "warn".
-->
<servers>

<server>
<id>sonatype-server</id>
<username>bsorrentino</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>

</servers>

<profiles>

<profile>
<id>sonatype</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>

<properties>
<release.repo.id>sonatype-server</release.repo.id>
<release.repo.url>https://oss.sonatype.org/service/local/staging/deploy/maven2</release.repo.url>
<snapshot.repo.id>sonatype-server</snapshot.repo.id>
<snapshot.repo.url>https://oss.sonatype.org/content/repositories/snapshots</snapshot.repo.url>
<group.repo.url>http://oss.sonatype.org/content/groups/public</group.repo.url>
</properties>

</profile>

</profiles>

<proxies>
</proxies>

</settings>

0 comments on commit b7409db

Please sign in to comment.