This action uses git tag for controlling the version. This action will not change/add/remove any file in your repository.
you can check .github/workflows/debug-ubuntu.yml
file for more details
- name: Run semantic versioning
uses: PacificPromise/semantic-versioning-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
script: increment_core_tag patch
Scripts define (increment_core_tag <increment type>
) patch, minor, major
increment_core_tag patch
: Increment patch version (1.0.xx)increment_core_tag minor
: Increment minor version (1.xx.0)increment_core_tag major
: Increment major version (xx.0.0)
Pre-release version: (increment_tag <pre-release>
) alpha, beta, dev, stg, prd
increment_tag alpha
: Increment pre-release alpha versionincrement_tag beta
: Increment pre-release beta versionincrement_tag dev
: Increment development environmentincrement_tag stg
: Increment staging environmentincrement_tag uat
: Increment UAT environment
- Create a sh file with below content
run_sample.sh
.
source /dev/stdin <<<"$(curl -s https://raw.githubusercontent.com/PacificPromise/semantic-versioning-action/main/index.sh)" && get_stage_prompt
- Run that file with bash (on Windows with git bash)
bash run_sample.sh
- Script will show the menu options:
Action:
Action:
1) Increment development environment 5) Increment patch version (1.0.xx)
2) Increment staging environment 6) Increment minor version (1.xx.0)
3) Increment UAT environment 7) Increment major version (xx.0.0)
4) Increment product environment 8) Quit
Choose: 1
Chose option: Increment development environment
Enumerating objects: 1, done.
Counting objects: 100% (1/1), done.
Writing objects: 100% (1/1), 171 bytes | 171.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:tuanngocptn/semantic-versioning-action.git
* [new tag] v5.0.4-dev+1 -> v5.0.4-dev+1
See the contributing guide to learn how to contribute to the repository and the development workflow.
Thanks go to these wonderful people:
Nick - Ngoc Pham |