-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: release on pypi through github actions #12
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Publish package to PyPi | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
|
||
push: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install pip | ||
run: pip install pip | ||
|
||
- name: Install Dependencies | ||
run: pip install setuptools wheel | ||
|
||
- name: Build package | ||
run: python setup.py sdist bdist_wheel | ||
|
||
- name: Publish to PyPi | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_UPLOAD_TOKEN }} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
.DS_STORE | ||
*.swp | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,8 +46,6 @@ def is_requirement(line): | |
return line and not line.startswith(('-r', '#', '-e', 'git+', '-c')) | ||
|
||
|
||
VERSION = get_version('warnings_report', '__init__.py') | ||
|
||
if sys.argv[-1] == 'tag': | ||
print("Tagging the version on github:") | ||
os.system(u"git tag -a %s -m 'version %s'" % (VERSION, VERSION)) | ||
|
@@ -68,7 +66,7 @@ def is_requirement(line): | |
license='AGPL', | ||
url='https://github.com/edx/pytest-warnings-report', | ||
description='A pytest plugin for generating warnings reports.', | ||
long_description=read('README.rst'), | ||
long_description=README, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. have you tested the output? why do we need to remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because it is already read and stored in README variable https://github.com/edx/pytest-warnings-report/blob/9981d9bd484abdb6feca72d2db68abd007b738d1/setup.py#L55 |
||
py_modules=['pytest_warnings_report'], | ||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', | ||
include_package_data=True, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file should end with a new line