Vendor asyncache to allow directly depending on cachetools (#683)
#88
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 to PyPI | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| jobs: | |
| publish-kr8s: | |
| if: github.repository == 'kr8s-org/kr8s' | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/kr8s | |
| permissions: | |
| id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Build package | |
| run: uv build | |
| - name: Publish kr8s | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| publish-kubectl-ng: | |
| if: github.repository == 'kr8s-org/kr8s' | |
| runs-on: ubuntu-latest | |
| needs: publish-kr8s | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Set env | |
| run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
| - name: Update kr8s pin in kubectl-ng | |
| run: | | |
| until false; do | |
| uv add --project examples/kubectl-ng kr8s==${RELEASE_VERSION} && break | |
| echo "Waiting for kr8s==${RELEASE_VERSION} to be available on PyPI..." | |
| sleep 15 | |
| done | |
| - name: Push new pins back to the repo | |
| run: | | |
| git config --global user.name 'Kr8s Bot' | |
| git config --global user.email '[email protected]' | |
| git commit -am "Bumping kubectl-ng pin to ${RELEASE_VERSION}" | |
| git push origin HEAD:main | |
| # Move the pin forward in our working copy to ensure the version is | |
| # dynamically generated correctly during publishing | |
| git tag -d ${RELEASE_VERSION} && git tag ${RELEASE_VERSION} | |
| - name: Publish kubectl-ng | |
| run: | | |
| uv build --project examples/kubectl-ng | |
| uv publish --project examples/kubectl-ng --token ${{ secrets.PYPI_TOKEN_KUBECTL_NG }} |