Skip to content

Readthedocs config

Readthedocs config #42

Workflow file for this run

name: Python Package
on:
push:
branches:
- main
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: python -m pip install --upgrade pip
- run: make test
- run: make build
- name: upload build artifact
uses: actions/upload-artifact@v4
with:
name: build-artifact
path: dist
if-no-files-found: error
publish-test-pypi:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: download build artifact
uses: actions/download-artifact@v4
with:
name: build-artifact
path: dist
- name: publish
uses: pypa/[email protected]
with:
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
publish-pypi:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- name: download build artifact
uses: actions/download-artifact@master
with:
name: build-artifact
path: dist
- name: publish
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_TOKEN }}