diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml new file mode 100644 index 000000000..7ca71041c --- /dev/null +++ b/.github/workflows/bump_version.yml @@ -0,0 +1,26 @@ +name: Bump version +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check branch name + id: check_branch_name + run: | + prefix="" + [ "${{ github.ref_name }}" == "master" ] + echo "TAG_PREFIX=$prefix" >> $GITHUB_OUTPUT + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + create_annotated_tag: true + default_bump: patch + release_branches: master + dry_run: false + tag_prefix: "${{ steps.check_branch_name.outputs.TAG_PREFIX }}" \ No newline at end of file