Skip to content

Commit d10155b

Browse files
authored
Publish to PyPI
1 parent ff21132 commit d10155b

4 files changed

Lines changed: 57 additions & 10 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags:
7+
- "v*.*.*"
8+
9+
jobs:
10+
publish-pypi:
11+
name: Publish to PyPI
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.11"
20+
21+
- name: Install Poetry
22+
run: |
23+
curl -sSL https://install.python-poetry.org | python3 -
24+
echo "$HOME/.local/bin" >> $GITHUB_PATH
25+
26+
- name: Configure Poetry for PyPI
27+
run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
28+
29+
- name: Install dependencies
30+
run: poetry install --no-root
31+
32+
- name: Build
33+
run: poetry build
34+
35+
- name: Publish to PyPI
36+
run: poetry publish

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Roadmap is a Python package that helps to analyze and visualize team's agile sof
55

66
### Install from PyPI
77
```sh
8-
$ pip install [TODO: package name]
8+
$ pip install rmp
99
```
1010

1111
## Usage examples

pyproject.toml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
[tool.poetry]
1+
[project]
22
name = "rmp"
3-
version = "0.1.0"
3+
dynamic = ["version"]
4+
5+
[tool.poetry]
46
description = "Analyze team performance for better predictability"
57
authors = ["Ergo Sarapu"]
8+
readme = "README.md"
9+
license = "MIT"
10+
packages = [
11+
{ include = "rmp", from = "src" },
12+
]
13+
version = "0.0.0"
614

715
[tool.poetry.dependencies]
816
python = "^3.11"
@@ -32,14 +40,17 @@ pandas-stubs = "^2.2.3.250308"
3240
ipykernel = "^6.29.5"
3341

3442
[build-system]
35-
requires = ["poetry-core>=1.0.0"]
36-
build-backend = "poetry.core.masonry.api"
43+
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
44+
build-backend = "poetry_dynamic_versioning.backend"
3745

38-
packages = [
39-
{ include = "rmp", from = "src" },
40-
]
46+
[tool.poetry.requires-plugins]
47+
poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = ["plugin"] }
4148

4249
[tool.mypy]
4350
files = ["src", "tests"]
4451
strict = true
45-
disallow_untyped_decorators = false
52+
disallow_untyped_decorators = false
53+
54+
[tool.poetry-dynamic-versioning]
55+
enable = true
56+
format-jinja = "{{base}}{% if major == 0 and minor == 0 and patch == 0 and distance > 0 %}.post{{ timestamp }}{% endif %}"

src/rmp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.0"
1+
__version__ = "0.0.0"

0 commit comments

Comments
 (0)