Skip to content
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

ci: added auto publishing to PyPi #53

Merged
merged 1 commit into from
Jul 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Upload Python Package
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: microsoft/playwright-github-action@v1
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r local-requirements.txt
pip install .
- name: Build driver
run: python build_driver.py
- name: Build package
run: python build_package.py
- name: Publish package
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload dist/*
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ env/
htmlcov/
.coverage
.DS_Store
.vscode/
.vscode/
.eggs
_repo_version.py
1 change: 1 addition & 0 deletions local-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ wheel==0.34.2
black==19.10b0
pre-commit==2.6.0
flake8==3.8.3
twine==3.2.0
1 change: 1 addition & 0 deletions playwright/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from playwright._repo_version import version as __version__ # noqa:F401
from playwright.main import playwright_object
import playwright.helper as helper

Expand Down
11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@

setuptools.setup(
name="playwright",
version="0.0.3",
author="Microsoft Corporation",
author_email="",
description="A high-level API to automate web browsers",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Microsoft/playwright-python",
packages=setuptools.find_packages(),
packages=["playwright"],
include_package_data=True,
install_requires=["pyee", "typing-extensions",],
install_requires=["pyee", "typing-extensions"],
classifiers=[
"Topic :: Software Development :: Testing",
"Topic :: Internet :: WWW/HTTP :: Browsers",
Expand All @@ -40,4 +39,10 @@
"Operating System :: OS Independent",
],
python_requires=">=3.7",
use_scm_version={
"version_scheme": "post-release",
"write_to": "playwright/_repo_version.py",
"write_to_template": 'version = "{version}"\n',
},
setup_requires=["setuptools_scm"],
)
17 changes: 0 additions & 17 deletions upload_package.py

This file was deleted.