Skip to content

Commit ce8b631

Browse files
ci: create tag on push to live
1 parent 72c6e0d commit ce8b631

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/create-tag.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Create tag
2+
3+
on:
4+
push:
5+
branches:
6+
- live
7+
8+
jobs:
9+
create-tag:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.12"
16+
- name: Install local package
17+
run: pip install .
18+
- name: Extract version
19+
run: |
20+
VERSION=$(python -c "import importlib.metadata; print(importlib.metadata.version('oc4ids-datastore-pipeline'))")
21+
echo "VERSION=$VERSION" >> $GITHUB_ENV
22+
- name: Print version
23+
run: echo $VERSION
24+
- name: Create tag
25+
run: |
26+
git tag "v${VERSION}"
27+
git push origin "v${VERSION}"

0 commit comments

Comments
 (0)