auto icon indicating copy to clipboard operation
auto copied to clipboard

Add next calculated tag version to auto version via flag

Open travis-crowder-kr opened this issue 4 years ago • 0 comments

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 }}

travis-crowder-kr avatar Aug 26 '21 05:08 travis-crowder-kr