Skip to content

Commit

Permalink
chore: use custom action to create the tag
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdrz committed Dec 9, 2024
1 parent a6dcf41 commit d02d556
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/create-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
with:
fetch-depth: 0

- name: Checkout to the input commit
- name: Compute the commit
run: |
if [[ -z "${{ inputs.commit }}" ]]; then
COMMIT=$(git rev-parse ${{ github.sha }}^@ | grep -Fvx ${{ github.event.pull_request.head.sha }})
else
COMMIT="${{ inputs.commit }}"
fi
git checkout $COMMIT
echo "commit=$COMMIT" >> $GITHUB_ENV
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -42,7 +42,8 @@ jobs:
echo "version=$(cargo pkgid -p bindgen | cut -d '#' -f 2)" >> $GITHUB_ENV
- name: Create tag
run: |
TAG_NAME="v${{ env.version }}"
git tag -s $TAG_NAME
git push origin $TAG_NAME
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_sha: ${{ env.commit }}
custom_tag: ${{ env.version }}

0 comments on commit d02d556

Please sign in to comment.