publish-pypi-deploy #8
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: publish-pypi-deploy | |
on: | |
release: | |
types: [ published ] | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: [ '3.10' ] | |
environment: | |
name: testpypi # pypi | |
url: https://test.pypi.org/legacy/ # https://pypi.org/p/pydicom | |
permissions: | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Build package | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install flit | |
flit build | |
# Run tests? Removed for now as merge into main does full testing | |
- name: Upload release to PyPI | |
# Note: in docs at https://github.com/pypa/gh-action-pypi-publish, | |
# it is suggested to publish in its own job, using 'needs' to | |
# ensure previous job succeeded, and artifact upload/download of | |
# the dist folder. That seems to be related mainly to multi-OS builds, | |
# so done in same job here. | |
uses: pypa/gh-action-pypi-publish@release/v1 |