I would like to use a pure solution in a GitHub action to increment a version of the package. I don't want to use any existing actions from the GitHub marketplace such as "gh-action-bump-version ". I have this workflow, which will increase the version and create a tag.
name: Version Increment on: push: branches: - main tags-ignore: - v* jobs: version: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: token: ${{ secrets.ACCESS_TOKEN }} - run: git config user.email "[email protected]" - run: git config user.name "$GITHUB_ACTOR" - run: npm version minor -m "v%s" - run: VERSION=$(node -p "require('./package.json').version") - run: git tag ${VERSION} - run: git push origin --tags - run: git push origin --follow-tags It works, but it also cause a circular runs of the actions because of the last row. I know that I can use a custom message like "[RELEASE]" and put there a "if" condition and skip these commits. But my question is, is there any better solution to skip these commits from this action and do not use the "if" condition? Because the "tags-ignore" obviously doesn't work.