-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec8c972
commit a21cdec
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |