Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
PyPI Deployment via GitHub Actions (#135)
Browse files Browse the repository at this point in the history
* Create python-publish.yml

* Do not deploy to PyPI via TravisCI

* Add PyPI deploy actions for Windows and macOS
  • Loading branch information
Sorami Hisamoto authored Jun 19, 2020
1 parent 98a112f commit 4fbf755
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 10 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/python-publish-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Upload Python Package for macOS

on:
release:
types: [created]

jobs:
deploy:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest]
architecture: [x64]
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
architecture: ${{ matrix.architecture }}
python-version: ${{ matrix.python-version }}
- 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 }}
run: |
python setup.py bdist_wheel
twine upload dist/*
35 changes: 35 additions & 0 deletions .github/workflows/python-publish-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Upload Python Package for Windows

on:
release:
types: [created]

jobs:
deploy:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [windows-latest]
architecture: [x64, x86]
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
architecture: ${{ matrix.architecture }}
python-version: ${{ matrix.python-version }}
- 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 }}
run: |
python setup.py bdist_wheel
twine upload dist/*
31 changes: 31 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflows 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: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
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 }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
10 changes: 0 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,3 @@ before_script:
script:
- ./scripts/format.sh
- python -m unittest discover tests
deploy:
provider: pypi
user: worksapplications
password:
secure: "desRZ1KuHoE7asLE2dXsVUB0iqhIsFIkawQjwcUcc14WybRhE1M4K2yRCoVmoizF6EPb50dh1qRChCm1lHKJZKA29s1SxN7xuzN+b1V2yhAcKvix/267O/1pQvb+vB6wTQIojksiG9QPJNRs75wvM0Rz+5/G6wX+WNQovkKODrE7F1gsyW2kvaw194Fc4jLX5GkKbiSpSlqthWja/YcdSkz/xnHP1fH7NEYdOXWTJ2vBmXgKJegsA9+S/GAhezSfurRkcLvijzwZtLfnlso3ToSRVFmn0NaZHK79+eUb4ub/8ojMFQih6/JCyV7StI3nOUgVV13XKvQ65po6XSs2NBydK3VIDVrvvAOw/89EKjB9nKhwxQLPRyCIke+XGPZdvQEEJlMTZjJGWOpYdkX0uBZhGMCTyxzddNeDo9aH2adOw/IywmTB8axd1J+SHfZFnxJNhe+0UEBV1GF87+W49Ks1jmT1QrElqXs65t2T4AMaQCrwkCYtZfiFUGXaoDr6hpaJFNaa8/1i6u9yhWJTTbsvSK1xhxNqb9BCxC3BjCg6tOGeMnhDGxU8xt10i9IrkZHhjiQzQiuzE6K3MAvbE3Y2wPslYuvxwGtsHHtfQ4LIOTu3tl9A+ay1adamolBGh8nTmyaaPIoONRRdFuEW2/W6q8CvWtAYn8lxyQNFdnw="
distributions: sdist
skip_cleanup: true
skip_existing: true
on:
tags: true

0 comments on commit 4fbf755

Please sign in to comment.