v1.1.2 #63
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release to PyPI | |
on: | |
release: | |
types: [released] | |
workflow_dispatch: | |
jobs: | |
test_publish: | |
runs-on: ubuntu-latest | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing to PyPI | |
id-token: write | |
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: | |
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 | |
publish: | |
needs: test_publish | |
runs-on: ubuntu-latest | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing to PyPI | |
id-token: write | |
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 PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- name: Test install from PyPI | |
run: | | |
pip install \ | |
--index-url https://pypi.org/simple/ \ | |
stimupy |