Skip to content

Change private async methods to async_ prefix (#320) #55

Change private async methods to async_ prefix (#320)

Change private async methods to async_ prefix (#320) #55

Workflow file for this run

name: Publish to PyPI
on:
push:
tags:
- "v*.*.*"
jobs:
publish-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: Build package
run: pipx install hatch && hatch build
- name: Publish kr8s
uses: pypa/gh-action-pypi-publish@release/v1
publish-kubectl-ng:
runs-on: ubuntu-latest
needs: publish-kr8s
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Update kr8s pin in kubectl-ng
run: |
pushd examples/kubectl-ng
poetry add kr8s==${RELEASE_VERSION}
poetry lock
popd
- name: Push new pins back to the repo
run: |
git config --global user.name 'Kr8s Bot'
git config --global user.email 'kr8s-bot@users.noreply.github.com'
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
uses: JRubics/poetry-publish@v1.16
with:
pypi_token: ${{ secrets.PYPI_TOKEN_KUBECTL_NG }}
poetry_version: ==1.4.0
plugins: "poetry-dynamic-versioning-plugin"
package_directory: "examples/kubectl-ng"