Merge pull request #202 from linkedin/amahasha/update_dexmaker_upload… #22
This file contains hidden or 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@v3 | |
| 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 publishSnapshotToCentral | |
| env: | |
| SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | |
| SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |