-
Notifications
You must be signed in to change notification settings - Fork 707
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use custom action to create the tag
- Loading branch information
Showing
1 changed file
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
commit_sha: ${{ env.commit }} | ||
custom_tag: ${{ env.version }} |