Skip to content

release-deploy

release-deploy #11

Workflow file for this run

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: 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
- 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 }}