Skip to content

Upload FF-PIV to PyPi #1

Upload FF-PIV to PyPi

Upload FF-PIV to PyPi #1

Workflow file for this run

name: Upload FF-PIV to PyPi
on:
workflow_dispatch:
jobs:
build-artifacts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install tomli flit twine
- name: Build artifacts
run: flit build
- uses: actions/upload-artifact@v3
with:
name: releases
path: dist
test-built-dist:
needs: build-artifacts
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: releases
path: dist
- name: List contents of built dist
run: |
ls -ltrh
ls -ltrh dist
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Verify the built dist/wheel is valid
run: |
python -m pip install dist/ffpiv*.whl
python -c "import ffpiv;print(ffpiv.__version__)"
upload-to-pypi:
needs: test-built-dist
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: releases
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.5.1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
verbose: true
skip_existing: true