Skip to content

Commit

Permalink
Add deploy workflow and release instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Apr 11, 2023
1 parent ac8e8c4 commit bbda04d
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: deploy

on:
push:
tags:
- "v*"

jobs:

deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Build and Check Package
uses: hynek/build-and-inspect-python-package@v1.5

- name: Download Package
uses: actions/download-artifact@v3
with:
name: Packages
path: dist

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_token }}
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Next Release
============
7 changes: 5 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -421,16 +421,19 @@ delta, and their paths are 0, (2, 2, 1, 0) and (2, 2, 1, 2, 2) respectively (whe
1 item, there is no need to use a tuple).


Releasing
---------

See `RELEASING.rst <RELEASING.rst>`__.

Maintenance
-----------

- Clone or fork the git repo, create a branch
- Install `pytest` and `nose` on your system: `python -m pip install pytest nose`
- Modify `nose2pytest/script.py` and `tests/test_script.py`
- In root folder, run `pytest`
- Once all tests pass, install tox on your system: on Ubuntu, `python -m pip install tox`
- Run tox: `tox`
- Increase the package version in setup.cfg and setup.py
- Add a python version if latest python is not in `tox.ini`

Notes for Ubuntu:
Expand Down
17 changes: 17 additions & 0 deletions RELEASING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Here are the steps on how to make a new release.

1. Create a ``release-VERSION`` branch from ``upstream/master``.
2. Install ``bumpversion`` and execute:

::

bumpversion minor --new-version 1.0.11

Changing ``minor`` and ``--new-version`` above accordingly.

3. Push a branch with the changes.
4. Once all builds pass and at least another maintainer approves, push a tag to ``upstream`` in the format ``v1.0.11`.
This will deploy to PyPI.
5. Merge the PR (do not squash, to keep the tag).
6. Create a new release on GitHub, posting the contents of the current CHANGELOG.
7. Open a new PR clearing the ``CHANGELOG.md`` file.

0 comments on commit bbda04d

Please sign in to comment.