Skip to content

Commit d02d556

Browse files
committed
chore: use custom action to create the tag
1 parent a6dcf41 commit d02d556

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/create-tag.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ jobs:
2525
with:
2626
fetch-depth: 0
2727

28-
- name: Checkout to the input commit
28+
- name: Compute the commit
2929
run: |
3030
if [[ -z "${{ inputs.commit }}" ]]; then
3131
COMMIT=$(git rev-parse ${{ github.sha }}^@ | grep -Fvx ${{ github.event.pull_request.head.sha }})
3232
else
3333
COMMIT="${{ inputs.commit }}"
3434
fi
35-
git checkout $COMMIT
35+
echo "commit=$COMMIT" >> $GITHUB_ENV
3636
3737
- name: Install rust toolchain
3838
uses: dtolnay/rust-toolchain@stable
@@ -42,7 +42,8 @@ jobs:
4242
echo "version=$(cargo pkgid -p bindgen | cut -d '#' -f 2)" >> $GITHUB_ENV
4343
4444
- name: Create tag
45-
run: |
46-
TAG_NAME="v${{ env.version }}"
47-
git tag -s $TAG_NAME
48-
git push origin $TAG_NAME
45+
uses: mathieudutour/[email protected]
46+
with:
47+
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
commit_sha: ${{ env.commit }}
49+
custom_tag: ${{ env.version }}

0 commit comments

Comments
 (0)