Maven publication renamed. #148
Workflow file for this run
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: Android CI | |
on: | |
workflow_dispatch: | |
push: | |
# branches: [ master ] | |
paths-ignore: | |
- '**/README.md' | |
- 'screenshots/**' | |
- '.gitignore' | |
- '.idea/**' | |
- '.run/**' | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
build: | |
name: π Build Android Library | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
# https://github.com/actions/checkout | |
- name: π Get latest code | |
uses: actions/checkout@v4 | |
with: | |
# Mandatory to get the extract version from tag. | |
fetch-depth: 0 | |
# https://github.com/actions/setup-java | |
- name: β Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
architecture: x64 | |
distribution: corretto | |
java-version: '17' | |
# https://github.com/gradle/actions/blob/main/docs/setup-gradle.md | |
- name: π Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-encryption-key: ${{ SECRETS.GRADLE_ENCRYPTION_KEY }} | |
cache-cleanup: always | |
- name: π Publish AAR to GPR | |
env: | |
GITHUB_ACTOR: ${{ GITHUB.REPOSITORY_OWNER }} | |
GITHUB_TOKEN: ${{ SECRETS.GITHUB_TOKEN }} | |
run: | | |
chmod +x ./gradlew | |
export VERSION=$(git for-each-ref refs/tags --sort=-refname --format='%(refname:short)' --count=1) | |
./gradlew --max-workers=2 :androidx-github:lint :androidx-github:publishLibraryPublicationToGitHubPackagesRepository | |
ls -la ./library/build/outputs/aar | grep aar | |
# https://github.com/actions/upload-artifact | |
- name: π¦ Retain Artifacts (AAR) | |
id: retain-library-aar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: androidx-github | |
path: ./library/build/outputs/aar/*.aar | |
retention-days: 14 | |
# https://github.com/actions/upload-artifact | |
- name: π¦ Retain Artifacts (Lint Results) | |
id: retain-lint-results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: androidx-github-lint | |
path: ./library/build/reports/* | |
retention-days: 14 | |
# - name: π Publish JAR to GPR | |
# env: | |
# GITHUB_ACTOR: ${{ GITHUB.REPOSITORY_OWNER }} | |
# GITHUB_TOKEN: ${{ SECRETS.GITHUB_TOKEN }} | |
# run: | | |
# # PUT -> HTTP 403 | |
# # ./gradlew --max-workers=2 :buildSrc:publishPluginPublicationToGitHubPackagesRepository | |
# ./gradlew --max-workers=2 :buildSrc:build | |
# ls -la ./buildSrc/build/libs | grep jar | |
# - name: π¦ Retain Artifacts (JAR) | |
# id: retain-library-jar | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: gpr-maintenance-gradle-plugin | |
# path: ./buildSrc/build/libs/*.jar | |
# retention-days: 14 |