Skip to content

Commit

Permalink
pypi test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hcwinsemius committed Nov 14, 2024
1 parent ec8c972 commit a21cdec
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/publish-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Upload FF-PIV to Test-PyPi

on:
release:
types: [published]
# allows running the workflow manually
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
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-test-pypi:
needs: test-built-dist
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: releases
path: dist
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@v1.5.1
with:
user: __token__
password: ${{ secrets.PYPI_TEST_TOKEN }}
repository_url: https://test.pypi.org/legacy/
verbose: true
skip_existing: true

0 comments on commit a21cdec

Please sign in to comment.