Skip to content

Commit

Permalink
Try creating and pushing the tag
Browse files Browse the repository at this point in the history
  • Loading branch information
dokempf committed Mar 11, 2024
1 parent fdfb433 commit abf2574
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,27 @@ 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',
})
# const newReference = await github.rest.git.createRef({
# context.repo.owner,
# context.repo.repo,
# ref: `refs/tags/${newTag.data.tag}`,
# sha: newTag.data.sha,
# })
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit abf2574

Please sign in to comment.