upstream (#39) #18
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: 'Snapshot to Maven' | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
ubuntu-latest-jdbc-wrapper-snapshot-to-maven: | |
name: 'Build And Upload Snapshot to Maven' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Clone Repository' | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 50 | |
- name: 'Set up JDK 8' | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: 8 | |
- name: 'Build Driver' | |
run: | | |
./gradlew --no-parallel --no-daemon -x test build | |
- name: "Decode Key Ring" | |
run: | | |
echo "${{secrets.GPG_SECRET_KEY_FILE}}" > ~/.gradle/secring.gpg.b64 | |
base64 -d ~/.gradle/secring.gpg.b64 > ~/.gradle/secring.gpg | |
- name: 'Install GPG Secret Key' | |
id: import_gpg | |
uses: crazy-max/ghaction-import-gpg@v5 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
- name: 'Upload Snapshot to Maven' | |
run: | | |
./gradlew --no-parallel --no-daemon publishAllPublicationsToOSSRHRepository -Psnapshot=${{secrets.ENABLE_SNAPSHOT}} -Psigning.keyId=${{secrets.GPG_KEY_ID}} -Psigning.password=${{secrets.GPG_PASSPHRASE}} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) | |
env: | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} |