cd #182
Workflow file for this run
This file contains 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: cd | |
on: | |
release: | |
types: | |
- published | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
publish_to_pypi: | |
name: publish to pypi on new release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
- name: Build and publish main package | |
env: | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
poetry config pypi-token.pypi $PYPI_TOKEN | |
poetry build | |
poetry publish | |
- name: Build and publish extensions | |
env: | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
cd $GITHUB_WORKSPACE | |
find extensions -name pyproject.toml | while read -r project; do | |
dir=$(dirname "$project") | |
echo "Building and publishing $dir" | |
cd "$dir" | |
poetry build | |
poetry publish | |
cd $GITHUB_WORKSPACE | |
done |