Skip to content

Chinese Whispers v0.9.0 #11

Chinese Whispers v0.9.0

Chinese Whispers v0.9.0 #11

Workflow file for this run

name: Release
on:
release:
types: [ published ]
workflow_dispatch:
env:
DO_NOT_TRACK: 1
jobs:
build:
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install --system -e '.[dev,docs]'
- name: Build
run: |
python3 -m build --sdist --wheel .
twine check --strict dist/*
- name: Upload packages
uses: actions/upload-artifact@v4
with:
name: packages
path: dist/
testpypi:
environment:
name: testpypi
url: https://test.pypi.org/p/chinese-whispers
permissions:
id-token: write
runs-on: ubuntu-latest
needs: build
steps:
- name: Download packages
uses: actions/download-artifact@v4
with:
name: packages
path: dist/
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
pypi:
if: github.event_name == 'release'
environment:
name: pypi
url: https://pypi.org/p/chinese-whispers
permissions:
id-token: write
runs-on: ubuntu-latest
needs: testpypi
steps:
- name: Download packages
uses: actions/download-artifact@v4
with:
name: packages
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1