Merge pull request #74 from Jaeho211/fix/overseas-balance-market #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Python ๐ distributions ๐ฆ to PyPI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| pypi-publish: | |
| name: upload release to PyPI | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/python-kis | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: '3.12.6' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install setuptools==72.1.0 wheel==0.43.0 twine==5.1.1 build==1.2.2.post1 | |
| - name: Extract tag name | |
| id: tag | |
| run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Update version in pykis/__env__.py | |
| run: | | |
| VERSION=${{ steps.tag.outputs.TAG_NAME }} | |
| VERSION=${VERSION#v} | |
| sed -i "s/{{VERSION_PLACEHOLDER}}/$VERSION/g" pykis/__env__.py | |
| - name: Build and publish | |
| run: | | |
| python -m build --sdist --wheel --outdir dist/ . | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist/ |