auto
auto copied to clipboard
Add next calculated tag version to auto version via flag
It would be nice to get the next determined tag version from auto version by using a flag/argument instead of it only returning the applied label (patch, minor, major). In GitHub Actions, I currently combine auto version and craig-day/compute-tag@v10 passing in the result of auto version to the version_type parameter of craig-day/compute-tag@v10
auto version --next-tag
...
Next version: v0.0.2
Current hack:
- id: auto_version
name: Get version bump type
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION_TYPE=$(~/.local/bin/auto version) && echo "VERSION_TYPE=${VERSION_TYPE}" >> "${GITHUB_ENV}"
- id: compute_tag
name: Compute next tag
uses: craig-day/compute-tag@v10
with:
github_token: ${{ github.token }}
version_type: ${{ env.VERSION_TYPE }}