Skip to content

Sphinx Multiversioning #691

Sphinx Multiversioning

Sphinx Multiversioning #691

name: build_and_upload_release
on:
release:
types:
- published
pull_request:
branches:
- dev
- master
jobs:
build:
name: build and upload release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up python
uses: actions/setup-python@v5
- name: setup poetry
run: |
python -m pip install --upgrade pip poetry
- name: build wheels and test uploading to pypi
if: startsWith(github.ref, 'refs/tags/v') != true
run: |
python -m poetry --build publish --dry-run
- name: build wheels and upload to pypi
if: startsWith(github.ref, 'refs/tags/v')
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: |
python -m poetry --build publish
- name: upload binaries into release
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true