Skip to content

Commit 62675ea

Browse files
committed
Add github action workflow that creates tags
1 parent 112e90e commit 62675ea

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/create-tag.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Create tag for release
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
8+
jobs:
9+
create-tag:
10+
if: github.event.pull_request.merged == true && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name && startsWith(github.event.pull_request.head.ref, 'bump-version')
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Extract version
17+
uses: dtolnay/rust-toolchain@stable
18+
run: |
19+
echo "version=$(cargo pkgid -p bindgen | cut -d '#' -f 2)" >> $GITHUB_ENV
20+
21+
- name: Create tag
22+
run: |
23+
TAG_NAME="v${{ env.VERSION }}"
24+
git tag $TAG_NAME
25+
git push origin $TAG_NAME

0 commit comments

Comments
 (0)