alpacahq / alpaca-py

The Official Python SDK for Alpaca API
https://alpaca.markets/sdks/python/getting_started.html
Apache License 2.0
537 stars 134 forks source link

Fix Workflow: Publish PyPI only on tag push #354

Closed AlexandrosKyriakakis closed 11 months ago

AlexandrosKyriakakis commented 11 months ago

Context

Right now when we push to master a new commit, the workflow that publish the commit to PyPI fails because we publish the same tag since new tag is not created yet. So after this PR we will publish to PyPI only when a tag is created.

alessiocastrica commented 11 months ago

Overall LGTM, maybe we can also consider adding this in the pyproject.toml:

[tool.poetry-dynamic-versioning] enable = true

As @hiohiohio suggested here.

AlexandrosKyriakakis commented 11 months ago

@alessiocastrica @hiohiohio I investigated and there is also another file need to be dynamically updated init.py here https://github.com/alpacahq/alpaca-py/blob/cccfb34b4c1f6bdc01807e7af7ee1fe606aac26f/alpaca/__init__.py#L1

So please let me merge this PR and come back with another one for dynamic versioning. What do you think?