Skip to content

Commit 430027d

Browse files
committed
Automate releases
1 parent d7f7b7b commit 430027d

File tree

3 files changed

+59
-9
lines changed

3 files changed

+59
-9
lines changed

.github/CONTRIBUTING.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ This document provides guidelines for contributions to `pyautocv`.
1111

1212
**Fixing typos and enhancing documentation**
1313

14-
To fix typos and/or grammatical errors, please edit the corresponding `.py` or `.md` file that generates the documentation.
14+
To fix typos and/or grammatical errors, please edit the corresponding `.py` or `.md` file that
15+
generates the documentation.
1516

16-
Please also update the docs using `sphinx`
17+
Please also update documentation by running `bash scripts/mkdocs.sh` as described also later.
1718

1819
**Pull Requests**
1920

20-
* Please raise an issue for discussion and reproducibility checks at [issues](https://github.com/Nelson-Gon/pyautocv/issues)
21+
* Please raise an issue for discussion and reproducibility checks at https://github.com/Nelson-Gon/pyautocv/issues
2122

2223
* Once the bug/enhancement is approved, please create a Git branch for the pull request.
2324

@@ -33,13 +34,21 @@ Please also update the docs using `sphinx`
3334
bash scripts/mkdocs.sh
3435
```
3536

37+
[See also](https://samnicholls.net/2016/06/15/how-to-sphinx-readthedocs/) for a guide on Sphinx documentation.
38+
3639
**Commit messages**
3740

3841
Please write commit messages in the format "Extends functionality" instead of "Extended functionality".
3942

4043

44+
**Maintainers only notice**
45+
46+
4147
**Releasing**
4248

49+
This should ideally not be run since we are auto-releasing via a GitHub action. If for some reason you would like to
50+
release a new version manually, then:
51+
4352
```shell
4453
bash scripts/release.sh
4554
```
@@ -54,4 +63,3 @@ Please note that the 'pyautocv' project is released with a
5463
[Contributor Code of Conduct](https://github/com/Nelson-Gon/pyautocv/.github/CODE_OF_CONDUCT.md).
5564
By contributing to this project, you agree to abide by its terms.
5665

57-
[See also](https://samnicholls.net/2016/06/15/how-to-sphinx-readthedocs/) for a guide on Sphinx documentation.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Uploads package to pypi
2+
3+
name: Upload Python Package
4+
5+
on:
6+
release:
7+
types: [created]
8+
9+
jobs:
10+
deploy:
11+
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: [3.6]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v1
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install setuptools wheel twine
29+
30+
- name: Build and publish
31+
env:
32+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
33+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
34+
run: |
35+
python setup.py sdist bdist_wheel
36+
twine upload dist/*

docs/source/CONTRIBUTING.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ This document provides guidelines for contributions to ``pyautocv``.
1313

1414
**Fixing typos and enhancing documentation**
1515

16-
To fix typos and/or grammatical errors, please edit the corresponding ``.py`` or ``.md`` file that generates the documentation.
16+
To fix typos and/or grammatical errors, please edit the corresponding ``.py`` or ``.md`` file that
17+
generates the documentation.
1718

18-
Please also update the docs using ``sphinx``
19+
Please also update documentation by running ``bash scripts/mkdocs.sh`` as described also later.
1920

2021
**Pull Requests**
2122

2223

2324
*
24-
Please raise an issue for discussion and reproducibility checks at `issues <https://github.com/Nelson-Gon/pyautocv/issues>`_
25+
Please raise an issue for discussion and reproducibility checks at https://github.com/Nelson-Gon/pyautocv/issues
2526

2627
*
2728
Once the bug/enhancement is approved, please create a Git branch for the pull request.
@@ -39,12 +40,19 @@ Please also update the docs using ``sphinx``
3940
4041
bash scripts/mkdocs.sh
4142
43+
`See also <https://samnicholls.net/2016/06/15/how-to-sphinx-readthedocs/>`_ for a guide on Sphinx documentation.
44+
4245
**Commit messages**
4346

4447
Please write commit messages in the format "Extends functionality" instead of "Extended functionality".
4548

49+
**Maintainers only notice**
50+
4651
**Releasing**
4752

53+
This should ideally not be run since we are auto-releasing via a GitHub action. If for some reason you would like to
54+
release a new version manually, then:
55+
4856
.. code-block:: shell
4957
5058
bash scripts/release.sh
@@ -60,5 +68,3 @@ The above does the following:
6068
Please note that the 'pyautocv' project is released with a
6169
`Contributor Code of Conduct <https://github/com/Nelson-Gon/pyautocv/.github/CODE_OF_CONDUCT.md>`_.
6270
By contributing to this project, you agree to abide by its terms.
63-
64-
`See also <https://samnicholls.net/2016/06/15/how-to-sphinx-readthedocs/>`_ for a guide on Sphinx documentation.

0 commit comments

Comments
 (0)