Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Devofure/version-reader-action
An android Github Action to get detailed version information
https://github.com/Devofure/version-reader-action
Last synced: 9 days ago
JSON representation
An android Github Action to get detailed version information
- Host: GitHub
- URL: https://github.com/Devofure/version-reader-action
- Owner: Devofure
- License: apache-2.0
- Created: 2022-03-13T10:30:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-10T06:07:11.000Z (almost 2 years ago)
- Last Synced: 2024-10-31T10:44:54.672Z (16 days ago)
- Language: JavaScript
- Homepage:
- Size: 838 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - Devofure/version-reader-action - An android Github Action to get detailed version information (JavaScript)
README
# Devofure/version-reader-action
Get the version code, android version name and detailed version information
For more information about Semver version format -> https://semver.org/
### Simple Example:
```yaml
- name: version reader
id: versionReader
uses: Devofure/[email protected]
# Default is app/build.gradle
```
Or
```yaml
- name: version reader
id: versionReader
uses: Devofure/[email protected]
with:
gradlePath: app/build.gradle # Default is app/build.gradle
```### outputs:
``` yaml
cleanVersionName
versionName
versionCode
majorVersion
minorVersion
patchVersionprereleaseVersion
prereleaseStage
prereleaseBuildNumber
buildMetaDataVersion
buildMetaDataType
buildMetaDataBuildNumber
```## Part of an example
``` yaml
jobs:
build:
runs-on: ubuntu-latest
steps:- uses: actions/checkout@v2
- name: version reader
id: versionReader
uses: Devofure/[email protected]
# possible to use:
# ${{ steps.versionReader.outputs.cleanVersionName }}
# ${{ steps.versionReader.outputs.versionName }}
# ${{ steps.versionReader.outputs.versionCode }}
# ${{ steps.versionReader.outputs.majorVersion }}
# ${{ steps.versionReader.outputs.minorVersion }}
# ${{ steps.versionReader.outputs.patchVersion }}
# ${{ steps.versionReader.outputs.prereleaseVersion }}
# ${{ steps.versionReader.outputs.prereleaseStage }}
# ${{ steps.versionReader.outputs.prereleaseBuildNumber }}
# ${{ steps.versionReader.outputs.buildMetaDataVersion }}
# ${{ steps.versionReader.outputs.buildMetaDataType }}
# ${{ steps.versionReader.outputs.buildMetaDataBuildNumber }}
```## Versions in detail
```powershell
# Given versionCode 345
345
{versionCode}# Given versionName 1.2.3-beta.543+debug.253
1.2.3-beta.543+debug.253
{1.2.3-beta.543+debug.253}
{versionName}1.2.3-beta.543+debug.253
{1}.{2}.{3}-{beta.543}+{debug.253}
{majorVersion}.{minorVersion}.{patchVersion}-{prereleaseVersion}+{buildMetaDataVersion}1.2.3-beta.543+debug.253
{1}.{2}.{3}-{beta}.{543}+{debug}.{253}
{majorVersion}.{minorVersion}.{patchVersion}-{prereleaseStage}.{prereleaseBuildNumber}+{buildMetaDataType}.{buildMetaDataBuildNumber}```
## Some example of the version format supported
```powershell
# build.gradle:
versionName "1.2.3"
versionCode 1435# outputs:
versionName: "1.2.3"
versionCode: 1435
majorVersion: 1
minorVersion: 2
patchVersion: 3
``````powershell
# build.gradle:
versionName "2.0.1-alpha.1227"
versionCode 4213# outputs:
versionName: "2.0.1-alpha.1227"
versionCode: 4213
majorVersion: 2
minorVersion: 0
patchVersion: 1prereleaseVersion: alpha.1227
prereleaseStage: alpha
prereleaseBuildNumber: 1227
``````powershell
# build.gradle:
versionName "1.1.2-prerelease+meta"
versionCode 1435# outputs:
versionName: "1.1.2-prerelease+meta"
versionCode: 1435
majorVersion: 1
minorVersion: 1
patchVersion: 2prereleaseVersion: prerelease
prereleaseStage: prerelease
buildMetaDataVersion: meta
``````powershell
# build.gradle:
versionName "1.0.0-alpha.debug.1"
versionCode 4213# outputs:
versionName: "1.0.0-alpha.debug.1"
versionCode: 4213
majorVersion: 1
minorVersion: 0
patchVersion: 0prereleaseVersion: alpha.debug.1
prereleaseStage: alpha.debug
prereleaseBuildNumber: 1
``````powershell
# build.gradle:
versionName "2.0.0-rc.21+debug.123"
versionCode 4213# outputs:
versionName: "2.0.0-rc.21+debug.123"
versionCode: 4213
majorVersion: 2
minorVersion: 0
patchVersion: 0prereleaseVersion: rc.21
prereleaseStage: rc
prereleaseBuildNumber: 21
buildMetaDataVersion: debug.123
buildMetaDataType: debug
buildMetaDataBuildNumber: 123
```