Version 0.3.0 #17
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: release-main | |
on: | |
release: | |
types: [published] | |
branches: [main] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
- name: Export tag | |
id: vars | |
run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT | |
- name: Set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install the latest version of rye | |
uses: eifinger/setup-rye@v2 | |
# https://github.com/astral-sh/rye/issues/1180 | |
- name: Patch Rye | |
run: | | |
echo "Patching Rye with Twine 5.1.1" | |
$RYE_HOME/self/bin/pip install twine==5.1.1 | |
- name: Build and publish | |
run: | | |
rye build | |
rye publish --token $PYPI_TOKEN --yes | |
env: | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
RELEASE_VERSION: ${{ steps.vars.outputs.tag }} |