Skip to content

Update all dependencies #22

Update all dependencies

Update all dependencies #22

Workflow file for this run

name: Build
on:
push:
branches:
- main
tags:
- '*'
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9', '3.10', 'pypy3.9' ]
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Set up Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
with:
python-version: ${{ matrix.python-version }}
- name: Install build tools
run: python3 -m pip install --upgrade build
- name: Test
run: cd src && python3 -m unittest discover -v
- name: Update version number
if: startsWith(github.ref, 'refs/tags/')
run: sed -i -e "s/0.0.0/${GITHUB_REF##*/}/" pyproject.toml
- name: Build
run: python3 -m build
- name: Upload artifacts
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4
with:
name: dist
path: dist
if-no-files-found: error
publish:
name: Publish
runs-on: ubuntu-latest
needs:
- build
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Download artifacts
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4
with:
name: dist
path: dist
- name: Install twine
run: pip install -U twine
- name: Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{secrets.PYPI_TOKEN}}
TWINE_NON_INTERACTIVE: true
run: twine upload dist/*