-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from matthewfeickert/ci/add-gha-for-publishing
ci: Update publishing workflow and add checks
- Loading branch information
Showing
3 changed files
with
53 additions
and
13 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 |
---|---|---|
@@ -1,26 +1,47 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
release: | ||
types: [created] | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install build twine | ||
python -m pip list | ||
- name: Build a sdist | ||
run: | | ||
python setup.py sdist | ||
twine upload dist/* | ||
python -m build --sdist . | ||
- name: Verify the distribution | ||
run: twine check dist/* | ||
|
||
- name: List contents of sdist | ||
run: python -m tarfile --list dist/panda-client-*.tar.gz | ||
|
||
- name: Publish distribution to PyPI | ||
if: github.event_name == 'release' && github.event.action == 'published' && github.repository == 'PanDAWMS/panda-client' | ||
uses: pypa/[email protected] | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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 |
---|---|---|
|
@@ -7,5 +7,8 @@ packager = Panda Team <[email protected]> | |
build_requires = python-devel | ||
requires = python | ||
|
||
[bdist_wheel] | ||
universal=1 | ||
|
||
[install] | ||
record = install_record.txt |
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 |
---|---|---|
|
@@ -144,16 +144,32 @@ def run (self): | |
except Exception: | ||
pass | ||
|
||
with open('README.md', 'r', encoding='utf-8') as description_file: | ||
long_description = description_file.read() | ||
|
||
setup( | ||
name="panda-client", | ||
version=release_version, | ||
description=' PanDA Client Package', | ||
long_description='''This package contains PanDA Client Tools''', | ||
description='PanDA Client Package', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
license='GPL', | ||
author='PanDA Team', | ||
author_email='[email protected]', | ||
url='https://panda-wms.readthedocs.io/en/latest/', | ||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', | ||
classifiers=[ | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
], | ||
|
||
# optional pip dependencies | ||
extras_require={ | ||
|