diff --git a/.github/workflows/tag-github.yml b/.github/workflows/tag-github.yml index bc72af0..daf0409 100644 --- a/.github/workflows/tag-github.yml +++ b/.github/workflows/tag-github.yml @@ -6,6 +6,12 @@ name: Tag GitHub on: workflow_call: + inputs: + add_v: + description: "Whether to add a v prefix to the version tag" + type: boolean + required: false + default: false outputs: changed: description: "Whether the VERSION file changed" @@ -44,6 +50,9 @@ jobs: validate="^[0-9]+\.[0-9]+\.[0-9]+$" if [[ $version =~ $validate ]]; then echo "changed=true" >> $GITHUB_OUTPUT + if [[ "${{ inputs.add_v }}" == "true" ]]; then + version="v${version}" + fi echo "version=$version" >> $GITHUB_OUTPUT else echo "Version change not for release" @@ -53,6 +62,6 @@ jobs: if: steps.version-change.outputs.changed == 'true' uses: onosproject/.github/.github/actions/create-github-release-action@main with: - version: ${{ steps.version-change.outputs.version }} + VERSION: ${{ steps.version-change.outputs.version }} env: - GH_TOKEN: ${{ secrets.GH_ONOS_PAT }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}