trying to get the version tag. #196
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: | |
- 'LICENSE' | |
- '**/README.md' | |
- 'screenshots/**' | |
- '.github/FUNDING.yml' | |
- '.gitignore' | |
- '.idea/**' | |
- '.run/**' | |
pull_request: | |
branches: [ master ] | |
tags: | |
- '*.*.*' | |
paths-ignore: | |
- 'LICENSE' | |
- '**/README.md' | |
- 'screenshots/**' | |
- '.github/FUNDING.yml' | |
- '.gitignore' | |
- '.idea/**' | |
- '.run/**' | |
jobs: | |
build: | |
name: π Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: π’ Set version 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: π Get latest code | |
uses: actions/checkout@v3 | |
- name: π’ Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: π¨ Build with Gradle | |
env: | |
VERSION_TAG: ${{ steps.vars.outputs.tag }} | |
run: | | |
echo $VERSION_TAG | |
./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 |