Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/usefulness/agp-version-finder-action
Find current stable and latest Android Gradle Plugin version for later use in GitHub Actions matrix
https://github.com/usefulness/agp-version-finder-action
agp android-gradle-plugin github-actions latest-version
Last synced: 3 days ago
JSON representation
Find current stable and latest Android Gradle Plugin version for later use in GitHub Actions matrix
- Host: GitHub
- URL: https://github.com/usefulness/agp-version-finder-action
- Owner: usefulness
- License: mit
- Created: 2022-09-05T07:57:55.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-31T06:34:06.000Z (15 days ago)
- Last Synced: 2024-11-12T14:02:54.206Z (3 days ago)
- Topics: agp, android-gradle-plugin, github-actions, latest-version
- Language: Python
- Homepage:
- Size: 48.8 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Android Gradle Plugin version finder - GitHub Action
[![.github/workflows/pull_request.yml](https://github.com/usefulness/agp-version-finder-action/actions/workflows/pull_request.yml/badge.svg)](https://github.com/usefulness/agp-version-finder-action/actions/workflows/pull_request.yml)
Find current stable and latest Android Gradle Plugin version for GitHub Actions matrix builds.
## Usage
The action only exposes multiple `output`s containing latest version for each AGP release channel.
### Configuration:
#### Simple usage:
```yml
jobs:
actual-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
javaVersion: [ 21 ]
gradle: [ current, release-candidate ]
agp: [ "stable", "rc", "alpha" ]
steps:
- id: agp-version-finder
uses: usefulness/agp-version-finder-action@v1
with:
version-to-resolve: ${{ matrix.agp }}- run: echo ${{ steps.agp-version-finder.outputs.resolved-version }}
```#### Extra: Use AGP version in job name:
```yml
jobs:
provide-agp-version-matrix:
runs-on: ubuntu-latest
outputs:
agp-versions: ${{ steps.build-agp-matrix.outputs.agp-versions }}
steps:
# Fetch latest AGP versions
- id: agp-version-finder
uses: usefulness/agp-version-finder-action@v1# Consume action outputs to build AGP matrix
- id: build-agp-matrix
run: echo 'agp-versions=["${{ steps.agp-version-finder.outputs.latest-stable }}", "${{ steps.agp-version-finder.outputs.latest-alpha }}"]' >> $GITHUB_OUTPUTactual-tests:
runs-on: ubuntu-latest
needs:
- provide-agp-version-matrix
strategy:
fail-fast: false
matrix:
javaVersion: [ 21 ]
gradle: [ current, release-candidate ]
# When evaluated will be replaced with array ["7.2.2", "7.4.0-alpha13"]
agp: ${{ fromJSON(needs.provide-agp-version-matrix.outputs.agp-versions) }}
```
[source](https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson)All available action outputs, representing respective AGP release channels:
- `latest-stable` i.e. _"7.2.2"_
- `latest-rc` i.e. _"7.3.0-rc01"_
- `latest-beta` i.e. _"7.3.0-beta02"_
- `latest-alpha` i.e. _"7.4.0-alpha13"_