Skip to content

Merge pull request #161 from creisle/fix/host-mistmatch-next-page #21

Merge pull request #161 from creisle/fix/host-mistmatch-next-page

Merge pull request #161 from creisle/fix/host-mistmatch-next-page #21

Workflow file for this run

# The "build" workflow produces wheels (and the sdist) for all python
# versions/platforms. Where possible (i.e. the build is not a cross-compile).
name: Build
on:
push:
branches:
# Run on release branches.
- "branch[0-9]*"
# Also run on certain other branches for testing.
- "build-workflow*"
tags:
- "v*"
env:
python-version: '3.8'
jobs:
build_sdist:
name: Build sdist
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: ${{ env.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Build a binary wheel and a source tarball
run: |
poetry build
- uses: actions/upload-artifact@v3
with:
path: ./dist/doccano*
upload_pypi_test:
name: Upload to PyPI (test)
needs: [build_sdist]
runs-on: ubuntu-20.04
if: github.event_name == 'push' && startsWith(github.ref_name, 'build-workflow')
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
upload_pypi:
name: Upload to PyPI (prod)
needs: [build_sdist]
runs-on: ubuntu-20.04
if: github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- name: Publish a Python distribution to PyPI
uses: pypa/[email protected]
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: ./dist/