Skip to content

Commit

Permalink
Update contributing guidelines, auto-release on release
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelson-Gon committed May 29, 2021
1 parent 11f7787 commit 6c4b57d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ This document provides guidelines for contributions to `urlfix`.

**Fixing typos and enhancing documentation**

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

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

**Pull Requests**

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

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

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

[See also](https://samnicholls.net/2016/06/15/how-to-sphinx-readthedocs/) for a guide on Sphinx documentation.

**Commit messages**

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


**Maintainers only notice**


**Releasing**

This should ideally not be run since we are auto-releasing via a GitHub action. If for some reason you would like to
release a new version manually, then:

```shell
bash scripts/release.sh
```
Expand All @@ -54,4 +63,3 @@ Please note that the 'urlfix' project is released with a
[Contributor Code of Conduct](https://github/com/Nelson-Gon/urlfix/.github/CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.

[See also](https://samnicholls.net/2016/06/15/how-to-sphinx-readthedocs/) for a guide on Sphinx documentation.
36 changes: 36 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Uploads package to pypi

name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:

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

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
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 sdist bdist_wheel
twine upload dist/*

0 comments on commit 6c4b57d

Please sign in to comment.