Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/igorgov/auto-inc-ver

Github action for automatically determine the version for next release by using repository tags.
https://github.com/igorgov/auto-inc-ver

github-actions release-automation tags version version-control versioning versions

Last synced: 4 days ago
JSON representation

Github action for automatically determine the version for next release by using repository tags.

Awesome Lists containing this project

README

        

# Auto Increment Version



GitHub License


GitHub Latest Release


GitHub stars


pulls


size


Doker stars

This action will automatically determine the version for next release by using repository tags. For develop releases: \.\-dev\ (e.g 2.0-dev0, 2.0-dev1), for stable releases: \.\ (1.0, 2.0, 2.1).

## Action Inputs

* **github_token**: Token to get tags from the repo. Pass in using 'secrets.GITHUB_TOKEN'.
* **mode**: Mode for next version calculation. Default: 'dev'. Available options:
* ***dev***: increment the 'dev' version (ignoring commit message) e.g. 1.0-dev1, 1.0-dev2.
* ***stable*** search the commit message for hashtags: #major - for major version (e.g 2.0), #patch - for patch version (e.g 1.1), if no hashtag found fails.
* **suffix**: suffix for un stable releases. default: 'dev'.

## Action Outputs

* **version**: The next release version

## Example

1. Pushing commits to develop branch -> 1.0-dev0 -> 1.0-dev1 -> 1.0-dev2 ...
2. Releasing an stable release -> commit with '#major' in commit message & push to main branch -> 1.0
3. Continue development (working on the next release), pushing to develop branch -> 2.0-dev0 -> 2.0-dev1 -> 2.0-dev2 ...
4. Hot-fix needed (stable release) -> commit with '#patch' in commit message & push to main branch -> 1.1
5. Continue pushing to develop branch -> 2.0-dev0 -> 2.0-dev1 -> 2.0-dev2 ...

## Usage

```yaml
- name: Auto Increment Version
uses: docker://igorgov/auto-inc-ver:v1.2.0
id: versioning
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
mode: stable

- name: Print next release version
shell: bash
run: |
echo "${{ steps.versioning.outputs.version }}"
```