-
-
Notifications
You must be signed in to change notification settings - Fork 471
44 lines (37 loc) · 1.19 KB
/
publish-pypi-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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