Skip to content

Chinese Whispers v0.9.0rc2 #9

Chinese Whispers v0.9.0rc2

Chinese Whispers v0.9.0rc2 #9

Workflow file for this run

name: Release
on:
push:
tags:
- v.*
release:
types: [ published ]
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/
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: 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
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