Skip to content

Unable to bump initial tag to anything other than DEFAULT_BUMP when creating a new repo #343

@BenChand

Description

@BenChand

How to reproduce:

  • Create a new repo
  • Use the standard template for PRs:
# example 2: on merge to master from pull request (recommended)
name: Bump version
on:
  pull_request:
    types:
      - closed
    branches:
      - master

jobs:
  build:
    if: github.event.pull_request.merged == true
    runs-on: ubuntu-22.04
    permissions:
      contents: write
    steps:
    - uses: actions/checkout@v4
      with:
        ref: ${{ github.event.pull_request.merge_commit_sha }}
        fetch-depth: '0'

    - name: Bump version and push tag
      uses: anothrNick/github-tag-action@v1 # Don't use @master or @v1 unless you're happy to test the latest version
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token
        TAG_PREFIX: v
        PRERELEASE: false
  • Create a new PR with "#patch" as the title and merge it into master
  • github-tag-action will run and set the first tag to v0.1.0 as minor is the default bump

If DEFAULT_BUMP is disabled, the action will do nothing as it defaults to "none"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions