- Make data.current() and data.history() async #91
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 🐍 distribution 📦 to PyPI | |
| on: push | |
| jobs: | |
| build: | |
| name: Build distribution 📦 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12.x" | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| - name: Build a binary wheel and a source tarball | |
| run: poetry build | |
| - name: Store the distribution packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-package-distributions | |
| path: dist/ | |
| publish-to-pypi: | |
| name: >- | |
| Publish Python 🐍 distribution 📦 to PyPI | |
| if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes | |
| needs: | |
| - build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/ziplime # Replace <package-name> with your PyPI project name | |
| permissions: | |
| id-token: write # IMPORTANT: mandatory for trusted publishing | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| - name: Download all the dists | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: python-package-distributions | |
| path: dist/ | |
| - name: Publish distribution 📦 to PyPI | |
| run: | | |
| poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} | |
| poetry publish | |
| #name: Publish Python 🐍 distribution 📦 to PyPI | |
| # | |
| #on: push | |
| # | |
| #jobs: | |
| # build: | |
| # name: Build distribution 📦 | |
| # runs-on: ubuntu-latest | |
| # | |
| # steps: | |
| # - name: Build and publish to pypi | |
| # uses: JRubics/poetry-publish@v2.1 | |
| # with: | |
| # python_version: "3.12.8" | |
| # pypi_token: ${{ secrets.PYPI_TOKEN }} | |
| # build_format: "sdist" | |
| # poetry_publish_options: "--dry-run" |