-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da5747e
commit c0db807
Showing
3 changed files
with
45 additions
and
3 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,42 @@ | ||
name: Deploy lib to Maven Central | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '17' | ||
|
||
- name: Prepare environment | ||
run: | | ||
git fetch --unshallow | ||
sudo bash -c "echo '$GPG_PRIVATE_KEY' | base64 -d > key.gpg" | ||
GPG_KEY=$(gpg --passphrase $GPG_PASSWORD --batch --yes --export-secret-keys --armor $SIGNING_KEY_ID key.gpg | grep -v '\-\-' | grep -v '^=.' | tr -d '\n') | ||
env: | ||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | ||
GPG_PASSWORD: ${{ secrets.GPG_PASSPHRASE }} | ||
SIGNING_KEY_ID: ${{ secrets.ANDROID_SIGNING_KEY_ID }} | ||
|
||
- name: Publish to Maven Central | ||
run: | | ||
./gradlew publishAndReleaseToMavenCentral \ | ||
-PsigningInMemoryKey=$GPG_KEY \ | ||
-PsigningInMemoryKeyPassword=$GPG_PASSWORD \ | ||
-PmavenCentralUsername=$MAVEN_USERNAME \ | ||
-PmavenCentralPassword=$MAVEN_PASSWORD | ||
env: | ||
GPG_PASSWORD: ${{ secrets.GPG_PASSPHRASE }} | ||
MAVEN_USERNAME: ${{ secrets.ANDROID_OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.ANDROID_OSSRH_PASSWORD }} | ||
|
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
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