Merge pull request #192 from prashanthswami/upgrade-agp #12
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: Deploy snapshot | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
if: ${{ !contains(github.event.head_commit.message, 'Prepare for release') }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Set up Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Cache Gradle Files | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches/ | |
~/.gradle/wrapper/ | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Build | |
run: ./gradlew build | |
- name: Publish package | |
run: ./gradlew publishAllPublicationsToSonatypeSnapshotRepository | |
env: | |
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |