diff --git a/.github/workflows/create-release-branch.yml b/.github/workflows/create-release-branch.yml index ea3156e1d4..10e7f3942a 100644 --- a/.github/workflows/create-release-branch.yml +++ b/.github/workflows/create-release-branch.yml @@ -3,11 +3,12 @@ on: workflow_dispatch: inputs: base-ref: - description: 'Git ref to base from' + description: 'Git ref to base from (defaults to latest tag)' type: string + default: 'latest' required: false bump-type: - description: '' + description: 'Version bump type (patch, minor)' type: string required: false default: 'patch' @@ -19,9 +20,15 @@ jobs: create-branch: runs-on: ubuntu-latest steps: + - run: echo "BASE_REF=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV + if: inputs.base-ref == 'latest' + + - run: echo "BASE_REF=${{ inputs.base-ref }}" >> $GITHUB_ENV + if: inputs.base-ref != 'latest' + - uses: actions/checkout@v3 with: - ref: ${{ inputs.base-ref }} + ref: ${{ env.BASE_REF }} fetch-depth: 0 submodules: true