From 97faca42308df1e1ba1d55327f4cf64640479014 Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Mon, 11 Mar 2024 09:39:22 +0100 Subject: [PATCH] Try creating and pushing the tag --- .github/workflows/bump.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index aee1176..9366eea 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -28,14 +28,20 @@ jobs: from packaging import version v = version.parse(setuptools_scm.get_version()) with open(os.environ['GITHUB_OUTPUT'], 'a') as fh: - print(f'tag=v{v.major}.{v.minor + 1}.0', file=fh) + print(f'tag=v{v.major}.{v.minor}.{v.micro + 1}', file=fh) - name: Debug the next tag run: echo ${{ steps.get_next_tag.outputs.tag }} - - uses: rickstaa/action-create-tag@v1 - id: "tag_create" + - uses: actions/github-script@v7 with: - tag: ${{ steps.get_next_tag.outputs.tag }} + script: | + const newTag = await github.rest.git.createTag({ + context.repo.owner, + context.repo.repo, + tag: '${{ steps.get_next_tag.outputs.tag }}', + object: context.sha, + type: 'commit', + }) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}