Skip to content

Commit 382e6f0

Browse files
authored
Merge pull request #481 from NeonGraal/publish-action
Create python-publish.yml
2 parents ed3374e + 5cabe69 commit 382e6f0

File tree

8 files changed

+52
-115
lines changed

8 files changed

+52
-115
lines changed

.github/workflows/python-publish.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
deploy:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.x'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine
25+
- name: Build and publish
26+
env:
27+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29+
run: |
30+
python setup.py sdist bdist_wheel
31+
twine upload dist/*

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,4 @@ type_info.json
105105

106106
shelf/
107107
tests/.sv/
108+
.history/

.mergify.yml

+11-7
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ pull_request_rules:
99
conditions:
1010
- label!=no-mergify
1111
- '#approved-reviews-by>=1'
12-
- status-success=Travis CI - Pull Request
13-
- status-success=continuous-integration/appveyor/pr
12+
- status-success=Python package / build (ubuntu-latest, 3.8) (pull_request)
13+
- status-success=Python package / build (windows-latest, 3.8) (pull_request)
14+
- status-success=Python package / build (macos-latest, 3.8) (pull_request)
1415
- status-success=codecov/project
1516
- status-success=pyup.io/safety-ci
17+
1618
- name: Automatic Merge for my PRs
1719
actions:
1820
merge:
@@ -23,17 +25,19 @@ pull_request_rules:
2325
conditions:
2426
- label!=no-mergify
2527
- author=neongraal
26-
- status-success=Travis CI - Pull Request
27-
- status-success=continuous-integration/appveyor/pr
28+
- status-success=Python package / build (ubuntu-latest, 3.8) (pull_request)
29+
- status-success=Python package / build (windows-latest, 3.8) (pull_request)
30+
- status-success=Python package / build (macos-latest, 3.8) (pull_request)
2831
- status-success=codecov/project
2932
- status-success=pyup.io/safety-ci
30-
33+
3134
- name: Automatic merge for PyUp PRs
3235
conditions:
3336
- label!=no-mergify
3437
- author=pyup-bot
35-
- status-success=Travis CI - Pull Request
36-
- status-success=continuous-integration/appveyor/pr
38+
- status-success=Python package / build (ubuntu-latest, 3.8) (pull_request)
39+
- status-success=Python package / build (windows-latest, 3.8) (pull_request)
40+
- status-success=Python package / build (macos-latest, 3.8) (pull_request)
3741
- status-success=codecov/project
3842
- status-success=pyup.io/safety-ci
3943
actions:

.travis.yml

-37
This file was deleted.

CONTRIBUTING.rst

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

109108
Tips
110109
----
@@ -125,4 +124,4 @@ $ bumpversion patch # possible: major / minor / patch
125124
$ git push
126125
$ git push --tags
127126

128-
Travis will then deploy to PyPI if tests pass.
127+
A GitHub action will then deploy to PyPI if tests pass.

README.rst

+6-8
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,8 @@ Script Venv
1010
:target: https://script-venv.readthedocs.io/en/latest/?badge=latest
1111
:alt: Documentation Status
1212

13-
14-
.. image:: https://img.shields.io/travis/NeonGraal/script-venv.svg?label=travis&logo=travis
15-
:target: https://travis-ci.org/NeonGraal/script-venv
16-
:alt: Travis CI (for Linux)
17-
18-
.. image:: https://img.shields.io/appveyor/ci/NeonGraal/script-venv.svg?label=appveyor&logo=appveyor
19-
:target: https://ci.appveyor.com/project/NeonGraal/script-venv
20-
:alt: Appveyor CI (for Windows)
13+
.. image:: https://github.com/NeonGraal/script-venv/workflows/Python%20package/badge.svg
14+
:alt: Github Actions
2115

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

7771
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
7872
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
73+
74+
Python dependencies scanned by PyUp.io_
75+
76+
.. _PyUp.io: https://pyup.io/

appveyor.yml

-51
This file was deleted.

tox.ini

-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
[tox]
22
envlist = py35, py36, py37, py38
33

4-
[travis]
5-
python =
6-
3.6: py36
7-
3.7: py37
8-
3.8: py38
9-
3.9: py39
10-
114
[testenv]
12-
passenv = CI TRAVIS TRAVIS_*
135
setenv =
146
PYTHONPATH = {toxinidir}
157
deps =

0 commit comments

Comments
 (0)