Release Android #9
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: Release Android | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Android Build | |
runs-on: ubuntu-latest | |
steps: | |
# Setup environment | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
# Build and release | |
- name: Build and release to Maven Central | |
env: | |
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | |
SONATYPE_PW: ${{ secrets.SONATYPE_PW }} | |
run: | | |
cat <(echo -e "${{ secrets.GPG_KEY }}") | gpg --batch --import | |
gpg --list-secret-keys --keyid-format LONG | |
export GPG_TTY=$(tty) | |
cd android | |
echo "signing.gnupg.passphrase=${{ secrets.GPG_PW }}" >> gradle.properties | |
./gradlew clean | |
./gradlew assembleRelease | |
./gradlew publish |