Skip to content

Commit

Permalink
Added automatic test pypi deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfernandez committed Jul 4, 2023
1 parent a78380d commit 0b3321d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build_n_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: PyPI Deployment
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags'A
on:
push:
tags:
- v*
jobs:
testpypi:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Python environment
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install development dependencies
uses: py-actions/[email protected]
with:
path: "dev-requirements.txt"
- name: Build packages to be uploaded
run: python -m build
- name: pypi-publish
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

2 changes: 2 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ mccabe >= 0.7.0
mypy >= 1.1.1
pre-commit >= 2.17.0
black >= 23.3.0
build
twine

0 comments on commit 0b3321d

Please sign in to comment.