Skip to content

Commit 52e8597

Browse files
committed
Update code to create tag
1 parent 2765c32 commit 52e8597

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

.github/workflows/release-samples.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111

12+
# Needed for creating tag
13+
permissions:
14+
contents: write
15+
1216
steps:
1317
- name: Checkout code
1418
uses: actions/checkout@v3
@@ -25,13 +29,29 @@ jobs:
2529
- name: Set current date as env variable
2630
run: echo "DATETIME=$(date +'%Y-%m-%dT%H-%M-%S')" >> $GITHUB_ENV
2731

32+
# - name: Bump version and push tag
33+
# id: tag_version
34+
# uses: mathieudutour/github-tag-action@v6.2
35+
# with:
36+
# custom_tag: v${{ env.DATETIME }}
37+
# tag_prefix: ""
38+
# github_token: ${{ secrets.GITHUB_TOKEN }}
39+
# run:
40+
# git config --global user.name "${GITHUB_ACTOR}"
41+
# git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
42+
# git tag "v${{ env.DATETIME }}"
43+
# git push origin "v${{ env.DATETIME }}"
44+
2845
- name: Bump version and push tag
29-
id: tag_version
30-
uses: mathieudutour/github-tag-action@v6.2
46+
uses: actions/github-script@v7
3147
with:
32-
custom_tag: v${{ env.DATETIME }}
33-
tag_prefix: ""
34-
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
script: |
49+
github.rest.git.createRef({
50+
owner: context.repo.owner,
51+
repo: context.repo.repo,
52+
ref: "refs/tags/v${{ env.DATETIME }}",
53+
sha: context.sha
54+
})
3555
3656
- name: Build notebooks
3757
run: |

0 commit comments

Comments
 (0)