diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index da8c353..c30a314 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -19,20 +19,23 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: success
+
- name: Exit if CI did not succeed
if: steps.wait-for-ci.outputs.conclusion != 'success'
run: exit 1
+
- uses: actions/checkout@v2
+
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.x
+
- name: Install dependencies
- run: pip install build
- - name: Build the wheel
- run: python -m build
+ run: pip install poetry
+
+ - name: Adjust version to the current tag
+ run: poetry version $(poetry run dunamai from git --pattern '(?P\d+\.\d+\.\d+)')
+
- name: Publish to PyPI
- uses: pypa/gh-action-pypi-publish@master
- with:
- user: __token__
- password: ${{ secrets.PYPI_TOKEN }}
+ run: poetry publish --username "__token__" --password "${{ secrets.PYPI_TOKEN }}"
diff --git a/poetry.lock b/poetry.lock
index 2ef13e2..b85b6a6 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -148,6 +148,14 @@ category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
+[[package]]
+name = "dunamai"
+version = "1.5.4"
+description = "Dynamic version generation"
+category = "dev"
+optional = false
+python-versions = ">=3.5,<4.0"
+
[[package]]
name = "filelock"
version = "3.0.12"
@@ -750,7 +758,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pyt
[metadata]
lock-version = "1.1"
python-versions = "^3.6.1"
-content-hash = "6ad2670b1b9f31963592984c7a29fd0fd819947f2ef57f428d4f3f7cbd0bb721"
+content-hash = "73eaa08a94390fad105c2f84beff6090466ec5561c2fd6eb2ba09d4818faeeee"
[metadata.files]
alabaster = [
@@ -904,6 +912,10 @@ docutils = [
{file = "docutils-0.16-py2.py3-none-any.whl", hash = "sha256:0c5b78adfbf7762415433f5515cd5c9e762339e23369dbe8000d84a4bf4ab3af"},
{file = "docutils-0.16.tar.gz", hash = "sha256:c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc"},
]
+dunamai = [
+ {file = "dunamai-1.5.4-py3-none-any.whl", hash = "sha256:0edbc8c37484b2db7c54b70de88c2b6ce866890440fc4bea6470cb1b88b75058"},
+ {file = "dunamai-1.5.4.tar.gz", hash = "sha256:82eb8dbdad6734a6ad475a2e8d0d5167fde7b0ae0d9529da0042129ca3736523"},
+]
filelock = [
{file = "filelock-3.0.12-py3-none-any.whl", hash = "sha256:929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"},
{file = "filelock-3.0.12.tar.gz", hash = "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59"},
diff --git a/pyproject.toml b/pyproject.toml
index 3ce91a1..c252d2a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pypitoken"
-version = "0.1.0"
+version = "0.0.0"
description = "Manipulate PyPI API tokens"
authors = ["Joachim Jablon "]
classifiers = [
@@ -23,6 +23,7 @@ Sphinx = "^3.5.1"
sphinx-material = "^0.0.32"
sphinx-github-changelog = "^1.0.2"
sphinx-autodoc-typehints = "^1.11.1"
+dunamai = "^1.5.4"
[build-system]
requires = ["poetry-core>=1.0.0"]