Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 #153
Workflow file for this run
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: Android CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
release: | |
types: [ published ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Setup | |
- uses: actions/checkout@v4 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
# Build | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle and run tests | |
run: ./gradlew build | |
# Upload libraries to workflow artifacts | |
- uses: actions/upload-artifact@v4 | |
if: ${{ github.event_name != 'pull_request' }} | |
with: | |
name: libraries | |
path: pay/build/outputs/aar/*.aar | |
if-no-files-found: error | |
retention-days: 5 | |
# Upload javadoc to workflow artifacts | |
- uses: actions/upload-artifact@v4 | |
if: ${{ github.event_name != 'pull_request' }} | |
with: | |
name: pay-javadoc | |
path: | | |
pay/build/docs/* | |
!pay/build/docs/**/*.zip | |
if-no-files-found: error | |
retention-days: 1 | |
# Publish to Maven Central (only for releases that start with 'v') | |
- name: Publish to Maven Central (release only) | |
if: ${{ github.event_name == 'release' && startsWith(github.event.release.tag_name, 'v') }} | |
env: | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVEN_CENTRAL_PUBLISHING_PRIVATE_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.MAVEN_CENTRAL_PUBLISHING_PRIVATE_KEY_PASSWORD }} | |
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.MAVEN_CENTRAL_PUBLISHING_USERNAME }} | |
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.MAVEN_CENTRAL_PUBLISHING_PASSWORD }} | |
TAG: ${{ github.event.release.tag_name }} | |
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -P version=${TAG:1} | |
# Note: only runs on 'push' events | |
publish-to-gh-pages: | |
runs-on: ubuntu-latest | |
needs: build | |
concurrency: publish-to-gh-pages | |
if: ${{ github.event_name == 'push' }} | |
steps: | |
- name: Update pay javadoc | |
uses: solana-mobile/gha-commit-artifact-to-branch@v2 | |
with: | |
token: ${{ secrets.UPDATE_GITHUB_PAGES_TOKEN }} | |
branch: gh-pages | |
artifact-name: pay-javadoc | |
dest: pay | |
commit-message: 'Update pay javadoc' | |
# Note: only runs on 'release' events | |
upload-to-release: | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
contents: write # needed for uploading files to releases | |
if: ${{ github.event_name == 'release' }} | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: libraries | |
path: libraries | |
- uses: actions/download-artifact@v4 | |
with: | |
name: pay-javadoc | |
path: pay-javadoc | |
- name: Compress pay javadoc | |
run: tar -cvzf pay-javadoc/pay-javadoc.tgz -C pay-javadoc javadoc | |
- name: Upload files to release | |
run: gh release -R ${GITHUB_REPOSITORY} upload ${TAG} ${FILES} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TAG: ${{ github.event.release.tag_name }} | |
FILES: | | |
libraries/*.aar | |
pay-javadoc/pay-javadoc.tgz |