v2.3.28 #60
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Package | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Configure Git user | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "GitHub Actions" | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Set up Apache Maven Central | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase | |
- run: | | |
echo "Setting up secrets." | |
echo "$BIGQUERY_CREDENTIALS_P12" | base64 -d > src/test/resources/bigquery_credentials.p12 | |
echo "$BIGQUERY_CREDENTIALS_PROTECTED_JSON" > src/test/resources/bigquery_credentials_protected.json | |
echo "$BIGQUERY_CREDENTIALS_PROTECTED_P12" | base64 -d > src/test/resources/bigquery_credentials_protected.p12 | |
echo "$INSTALLEDACCOUNT_PROPERTIES" > src/test/resources/installedaccount.properties | |
echo "$INSTALLEDACCOUNT1_PROPERTIES" > src/test/resources/installedaccount1.properties | |
echo "$PROTECTEDACCOUNT_JSON_PROPERTIES" > src/test/resources/protectedaccount-json.properties | |
echo "$PROTECTEDACCOUNT_PROPERTIES" > src/test/resources/protectedaccount.properties | |
echo "$SERVICE_ACCOUNT_PROPERTIES" > src/test/resources/serviceaccount.properties | |
echo "$OAUTHACCOUNT_PROPERTIES" > src/test/resources/oauthaccount.properties | |
echo "Secrets loaded!" | |
echo "$MAVEN_PASSWORD" | sha256sum | |
cat ~/.m2/settings.xml | |
shell: bash | |
env: | |
BIGQUERY_CREDENTIALS_P12: ${{ secrets.BIGQUERY_CREDENTIALS_P12 }} | |
BIGQUERY_CREDENTIALS_PROTECTED_JSON: ${{ secrets.BIGQUERY_CREDENTIALS_PROTECTED_JSON }} | |
BIGQUERY_CREDENTIALS_PROTECTED_P12: ${{ secrets.BIGQUERY_CREDENTIALS_PROTECTED_P12 }} | |
INSTALLEDACCOUNT_PROPERTIES: ${{ secrets.INSTALLEDACCOUNT_PROPERTIES }} | |
INSTALLEDACCOUNT1_PROPERTIES: ${{ secrets.INSTALLEDACCOUNT1_PROPERTIES }} | |
PROTECTEDACCOUNT_JSON_PROPERTIES: ${{ secrets.PROTECTEDACCOUNT_JSON_PROPERTIES }} | |
PROTECTEDACCOUNT_PROPERTIES: ${{ secrets.PROTECTEDACCOUNT_PROPERTIES }} | |
SERVICE_ACCOUNT_PROPERTIES: ${{ secrets.SERVICE_ACCOUNT_PROPERTIES }} | |
OAUTHACCOUNT_PROPERTIES: ${{ secrets.OAUTHACCOUNT_PROPERTIES }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |
- name: Publish Nexus Package | |
run: mvn -P release -B clean deploy -DskipTests | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} |