Test deploy workflow #2
Workflow file for this run
This file contains hidden or 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 ] | ||
# pull_request: | ||
# branches: [ main ] | ||
jobs: | ||
build: | ||
name: Build the package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- name: Build package | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install build | ||
python -m build | ||
- name: Upload artifacts | ||
if: ${{ success() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels | ||
path: dist/ | ||
name: Upload release to PyPI | ||
needs: [ build ] | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/project/types-pydicom/ | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Download the package files | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: dist/ | ||
merge-multiple: true | ||
- name: Publish package to PyPi | ||
uses: pypa/gh-action-pypi-publish@release/v1 |