trying to get the version tag. #192
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: [ master ] | |
tags: | |
- '*.*.*' | |
paths-ignore: | |
- '**/README.md' | |
- 'screenshots/**' | |
- '.gitignore' | |
- '.idea/**' | |
- '.run/**' | |
pull_request: | |
branches: [ master ] | |
tags: | |
- '*.*.*' | |
paths-ignore: | |
- '**/README.md' | |
- 'screenshots/**' | |
- '.gitignore' | |
- '.idea/**' | |
- '.run/**' | |
jobs: | |
build: | |
name: π Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Get latest code | |
uses: actions/checkout@v3 | |
- name: π’ Set current tag | |
id: vars | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
# https://github.com/actions/setup-java | |
- name: β Set up AWS Corretto JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: corretto | |
java-version: '17' | |
architecture: x64 | |
- name: π’ Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: π¨ Build with Gradle | |
env: | |
VERSION_TAG: ${{ steps.vars.outputs.tag }} | |
run: ./gradlew :library:assembleRelease | |
# https://github.com/actions/upload-artifact | |
- name: π¦ Retain Artifacts (Release AAR) | |
id: retain-release-aar | |
uses: actions/upload-artifact@v3 | |
with: | |
name: androidx-colorpicker-aar | |
path: ./library/build/outputs/aar/colorpicker_*-release.aar | |
retention-days: 14 |