Skip to content

Commit 11ad22e

Browse files
committed
✨ update automated taging
1 parent c93d0c4 commit 11ad22e

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

.github/workflows/python-publish.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,24 @@ jobs:
2424
curl -sSL https://install.python-poetry.org | python3 -
2525
echo "export PATH=\"$HOME/.local/bin:$PATH\"" >> $GITHUB_ENV
2626
27+
- name: Install poetry-dynamic-versioning plugin
28+
run: poetry self add "poetry-dynamic-versioning[plugin]"
29+
2730
- name: Install dependencies
2831
run: poetry install --no-interaction --no-ansi
2932

3033
- name: Build the package
3134
run: poetry build
3235

36+
# 🔹 Commit metadata back to repo
37+
- name: Commit and push metadata
38+
run: |
39+
git config --global user.name "github-actions[bot]"
40+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
41+
git add metadata/
42+
git commit -m ":bookmark: Update metadata after release"
43+
git push origin HEAD:main
44+
3345
- name: Configure Poetry for PyPI
3446
run: |
3547
poetry config pypi-token.pypi ${{ secrets.TWINE_API_TOKEN }}
@@ -43,12 +55,3 @@ jobs:
4355
run: |
4456
mkdir -p metadata
4557
poetry run python -c "from ontolearner import OntoLearnerMetadataExporter; OntoLearnerMetadataExporter().export('metadata/ontolearner-metadata.rdf')"
46-
47-
# 🔹 Commit metadata back to repo
48-
- name: Commit and push metadata
49-
run: |
50-
git config --global user.name "github-actions[bot]"
51-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
52-
git add metadata/
53-
git commit -m ":bookmark: Update metadata after release"
54-
git push origin HEAD:main

.github/workflows/test-package.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ jobs:
2828
curl -sSL https://install.python-poetry.org | python3 -
2929
echo "$HOME/.local/bin" >> $GITHUB_PATH
3030
31+
- name: Install poetry-dynamic-versioning plugin
32+
run: |
33+
poetry self add "poetry-dynamic-versioning[plugin]"
34+
3135
- name: Configure Poetry and install dependencies
3236
run: |
3337
poetry config virtualenvs.create false

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ pytest = "*"
4040

4141
[tool.poetry-dynamic-versioning]
4242
enable = true
43-
vcs = "git"
4443
style = "semver"
45-
pattern = "tag"
44+
source = "attr"
45+
attr = "ontolearner.__version__"
4646

4747
[build-system]
4848
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.4.0"]

0 commit comments

Comments
 (0)