Skip to content

Commit

Permalink
Merge pull request #481 from NeonGraal/publish-action
Browse files Browse the repository at this point in the history
Create python-publish.yml
  • Loading branch information
NeonGraal committed Jan 9, 2021
2 parents ed3374e + 5cabe69 commit 382e6f0
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 115 deletions.
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 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: 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/*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@ type_info.json

shelf/
tests/.sv/
.history/
18 changes: 11 additions & 7 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ pull_request_rules:
conditions:
- label!=no-mergify
- '#approved-reviews-by>=1'
- status-success=Travis CI - Pull Request
- status-success=continuous-integration/appveyor/pr
- status-success=Python package / build (ubuntu-latest, 3.8) (pull_request)
- status-success=Python package / build (windows-latest, 3.8) (pull_request)
- status-success=Python package / build (macos-latest, 3.8) (pull_request)
- status-success=codecov/project
- status-success=pyup.io/safety-ci

- name: Automatic Merge for my PRs
actions:
merge:
Expand All @@ -23,17 +25,19 @@ pull_request_rules:
conditions:
- label!=no-mergify
- author=neongraal
- status-success=Travis CI - Pull Request
- status-success=continuous-integration/appveyor/pr
- status-success=Python package / build (ubuntu-latest, 3.8) (pull_request)
- status-success=Python package / build (windows-latest, 3.8) (pull_request)
- status-success=Python package / build (macos-latest, 3.8) (pull_request)
- status-success=codecov/project
- status-success=pyup.io/safety-ci

- name: Automatic merge for PyUp PRs
conditions:
- label!=no-mergify
- author=pyup-bot
- status-success=Travis CI - Pull Request
- status-success=continuous-integration/appveyor/pr
- status-success=Python package / build (ubuntu-latest, 3.8) (pull_request)
- status-success=Python package / build (windows-latest, 3.8) (pull_request)
- status-success=Python package / build (macos-latest, 3.8) (pull_request)
- status-success=codecov/project
- status-success=pyup.io/safety-ci
actions:
Expand Down
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

7 changes: 3 additions & 4 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,8 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 3.6, 3.7, 3.8, 3.9, and for PyPy. Check
https://travis-ci.org/neongraal/script_venv/pull_requests
and make sure that the tests pass for all supported Python versions.
3. The pull request should work for Python 3.6, 3.7, 3.8, 3.9, and for PyPy.
Check that the tests pass for all supported Python versions.

Tips
----
Expand All @@ -125,4 +124,4 @@ $ bumpversion patch # possible: major / minor / patch
$ git push
$ git push --tags

Travis will then deploy to PyPI if tests pass.
A GitHub action will then deploy to PyPI if tests pass.
14 changes: 6 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,8 @@ Script Venv
:target: https://script-venv.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status


.. image:: https://img.shields.io/travis/NeonGraal/script-venv.svg?label=travis&logo=travis
:target: https://travis-ci.org/NeonGraal/script-venv
:alt: Travis CI (for Linux)

.. image:: https://img.shields.io/appveyor/ci/NeonGraal/script-venv.svg?label=appveyor&logo=appveyor
:target: https://ci.appveyor.com/project/NeonGraal/script-venv
:alt: Appveyor CI (for Windows)
.. image:: https://github.com/NeonGraal/script-venv/workflows/Python%20package/badge.svg
:alt: Github Actions

.. image:: https://img.shields.io/codecov/c/github/NeonGraal/script-venv.svg
:target: https://codecov.io/gh/NeonGraal/script-venv
Expand Down Expand Up @@ -76,3 +70,7 @@ This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypack

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage

Python dependencies scanned by PyUp.io_

.. _PyUp.io: https://pyup.io/
51 changes: 0 additions & 51 deletions appveyor.yml

This file was deleted.

8 changes: 0 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
[tox]
envlist = py35, py36, py37, py38

[travis]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39

[testenv]
passenv = CI TRAVIS TRAVIS_*
setenv =
PYTHONPATH = {toxinidir}
deps =
Expand Down

0 comments on commit 382e6f0

Please sign in to comment.