This repository has been archived by the owner on Mar 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from gaiksaya/mavenupload
Adds workflow to upload jar to maven
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Upload sql-jdbc Jar to Maven | ||
|
||
# This workflow will upload the sql-jdbc jar to maven when a new tag is cut | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
upload-jdbc-jar: | ||
runs-on: [ubuntu-16.04] | ||
name: Upload Jar to Maven | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Configure AWS CLI | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-1 | ||
|
||
# Since release workflow uses java 10 | ||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '10' | ||
|
||
- name: Upload jdbc Jar to Maven | ||
env: | ||
passphrase: ${{ secrets.PASSPHRASE }} | ||
run: | | ||
cd .. | ||
export JAVA10_HOME=$JAVA_HOME | ||
aws s3 cp s3://opendistro-docs/github-actions/pgp-public-key . | ||
aws s3 cp s3://opendistro-docs/github-actions/pgp-private-key . | ||
gpg --import pgp-public-key | ||
gpg --allow-secret-key-import --import pgp-private-key | ||
mkdir /home/runner/.gradle | ||
aws s3 cp s3://opendistro-docs/github-actions/gradle.properties /home/runner/.gradle/ | ||
cd sql-jdbc | ||
./gradlew publishShadowPublicationToSonatype-stagingRepository -Dcompiler.java=10 -Dbuild.snapshot=false -Djavax.net.ssl.trustStore=$JAVA_HOME/lib/security/cacerts |