Skip to content

Commit

Permalink
Trying to get version from tag (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
stabacco authored Sep 11, 2020
1 parent ddcacfc commit 4c74bf0
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 37 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- uses: actions/setup-python@v2
with:
python-version: 3.7
Expand All @@ -19,4 +22,4 @@ jobs:
with:
poetry-version: 1.0.10
- name: Publish python package
run: poetry build && poetry publish -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }}
run: poetry version ${{ steps.vars.outputs.tag }} && poetry build && poetry publish -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }}
105 changes: 70 additions & 35 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ python-dotenv = "^0.13.0"
pydantic = "^1.5.1"
inflection = "^0.5.0"
aiohttp = "^3.6.2"
single-version = "^1.2.2"

[tool.poetry.dev-dependencies]
pylint = "^2.5.3"
Expand All @@ -32,7 +33,7 @@ coverage-badge = "^1.0.1"

[tool.isort]
profile = "black"
known_third_party = ["aiohttp", "aioresponses", "dotenv", "inflection", "pkg_resources", "pydantic", "pytest"]
known_third_party = ["aiohttp", "aioresponses", "dotenv", "inflection", "pkg_resources", "pydantic", "pytest", "single_version"]
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
Expand Down
6 changes: 6 additions & 0 deletions stake/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# flake8: noqa
from pathlib import Path

from single_version import get_version

from .client import *
from .funding import *
from .fx import *
Expand All @@ -8,3 +12,5 @@
from .trade import *
from .transaction import *
from .watchlist import *

__version__ = get_version("awesome_name", Path(__file__).parent.parent)

0 comments on commit 4c74bf0

Please sign in to comment.