Skip to content

Commit

Permalink
add test pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Jul 18, 2023
1 parent d291460 commit 175450f
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/test_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and upload to test PyPI

on:
workflow_dispatch:
release:
types:
- published

jobs:
build_wheels:
name: Build wheels
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: Build wheels
run: |
pip wheel -w wheelhouse .
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.test_pypi_password }}
skip-existing: true
verbose: true

0 comments on commit 175450f

Please sign in to comment.