Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/igorgov/auto-inc-ver
- Owner: IgorGov
- License: mit
- Created: 2022-02-05T04:52:48.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-02-06T11:06:57.000Z (over 2 years ago)
- Last Synced: 2024-09-29T23:41:44.549Z (4 days ago)
- Topics: github-actions, release-automation, tags, version, version-control, versioning, versions
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Auto Increment Version
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 }}"
```