Skip to content

Commit

Permalink
Merge pull request #1 from d33bs/main
Browse files Browse the repository at this point in the history
Publish Action
  • Loading branch information
Dave Bunten authored Mar 12, 2021
2 parents 982d806 + a762c54 commit b63a8b3
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 6 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/python-lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,28 @@ jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v2
- name: Setup Python 3.8

- name: 🐍 Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
python-version: ${{ matrix.python-version }}

- name: ⚙️ Install dependencies
run: |
python -m pip install --upgrade pip
pip install black pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with black
- name: ✨ Lint with black
run: |
black . --check
- name: Test with pytest
- name: ✅ Test with pytest
run: |
pytest
50 changes: 50 additions & 0 deletions .github/workflows/python-publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Python Publish Release

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v2

- name: 🐍 Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: ⚙️ Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: 📦 Build packages
run: |
python setup.py sdist bdist_wheel
- name: 🚛 Publish on testpypi
env:
TWINE_REPOSITORY: testpypi
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
run: |
twine upload dist/*
- name: 🚚 Publish on pypi
env:
TWINE_REPOSITORY: pypi
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# This call to setup() does all the work
setuptools.setup(
name="zoom_client",
version="0.0.1",
version="0.0.2",
description="Zoom (Video Communications) API Client",
long_description=README,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit b63a8b3

Please sign in to comment.