-
Notifications
You must be signed in to change notification settings - Fork 11
52 lines (42 loc) · 1.28 KB
/
release-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
45
46
47
48
49
50
51
52
name: release-deploy
on:
release:
types: [ published ]
jobs:
deploy:
strategy:
fail-fast: true
matrix:
python-version: [ '3.10' ]
os: [ 'ubuntu-latest', 'windows-latest' ]
runs-on: ${{ matrix.os }}
name: Deploy for ${{ matrix.os }} with Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build package
run: |
python -m pip install --upgrade pip
python -m pip install build
python -m build
- name: Publish package to PyPI
if: matrix.os == 'ubuntu-latest'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN_VALIDATOR }}
- name: Build Windows executables
if: matrix.os == 'windows-latest'
run: |
python -m pip install -r requirements-dev.txt
pyinstaller dicom-validator.spec -y
- name: Publish Windows executables on GitHub
if: matrix.os == 'windows-latest'
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: dist/*.exe