Skip to content

Release to PyPI

Release to PyPI #47

Workflow file for this run

name: Release to PyPI
on:
release:
workflow_dispatch:
jobs:
test_publish:
runs-on: ubuntu-latest
steps:
- name: Fetch wheel(s) from release
uses: dsaltares/fetch-gh-release-asset@1.1.0
with:
regex: true
file: 'stimupy-.[0-9]*\.[0-9]*\.[0-9]*-py3-none-any\.whl'
target: 'dist/'
- name: Fetch sdist(s) from release
uses: dsaltares/fetch-gh-release-asset@1.1.0
with:
regex: true
file: 'stimupy-.[0-9]*\.[0-9]*\.[0-9]*\.tar.gz'
target: 'dist/'
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Test install from TestPyPI
run: |
pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
stimupy