Skip to content

Deploy to Nexus

Deploy to Nexus #3

name: Deploy to Nexus
on:
workflow_dispatch:
jobs:
deployAarsToNexus:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '17'
- shell: bash
env:
# The following env variables are used by gradle/publish-module.gradle
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
# The following env variables are used by gradle/publish-root.gradle
OSSR_USERNAME: ${{ secrets.OSSR_USERNAME }}
OSSR_PASSWORD: ${{ secrets.OSSR_PASSWORD }}
SONATYPE_STATING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
# The script generates sec.gpg file that is required by gradle/publish-module.gradle
# and starts :deployNexus lane using fastlane.
run: |
echo "${{ secrets.GPG_FILE }}" > sec.gpg.asc
gpg -d --passphrase "${{ secrets.GPG_FILE_PSWD }}" --batch sec.gpg.asc > sec.gpg
fastlane deployNexus