Skip to content

Commit 0909b57

Browse files
author
Roberto Vera Alvarez
committed
Fixing poetry versioning
1 parent a59030a commit 0909b57

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed
Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflows will upload a Python Package using Poetry when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3-
41
name: Upload Python Package
52

63
on:
@@ -10,20 +7,29 @@ on:
107

118
jobs:
129
deploy:
13-
1410
runs-on: ubuntu-latest
1511

1612
steps:
17-
- uses: actions/checkout@v4
18-
- name: Set up Python
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version: '3.x'
22-
- name: Install Poetry
23-
run: pip install poetry
24-
- name: Build and publish
25-
env:
26-
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
27-
run: |
28-
poetry build
29-
poetry publish
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0 # fetch full history & tags
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.x'
21+
22+
- name: Install Poetry
23+
run: pip install poetry
24+
25+
- name: Install version plugin
26+
# Ensure that poetry-dynamic-versioning plugin is available to Poetry CLI
27+
run: |
28+
poetry self add poetry-dynamic-versioning[plugin]
29+
30+
- name: Build and publish
31+
env:
32+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
33+
run: |
34+
poetry build
35+
poetry publish

0 commit comments

Comments
 (0)