Skip to content

Commit

Permalink
Push workflow files to publish on PyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
aymgal committed Jul 30, 2024
1 parent 0eaedcc commit 3125fbf
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish to PyPi

on: workflow_dispatch

jobs:
build-and-publish:
name: Build python package and publish to PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build
run: python setup.py sdist bdist_wheel
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/publish-to-testpypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish to Test PyPi

on: workflow_dispatch

jobs:
build-and-publish:
name: Build python package and publish to Test PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build
run: python setup.py sdist bdist_wheel
- name: Publish to Test PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

0 comments on commit 3125fbf

Please sign in to comment.