Skip to content

Commit

Permalink
Merge pull request #25 from nicoddemus/deploy-workflow
Browse files Browse the repository at this point in the history
Deploy workflow and release instructions
  • Loading branch information
schollii authored Apr 11, 2023
2 parents 145d819 + bbda04d commit dde6b5a
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 5 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.
2 changes: 1 addition & 1 deletion nose2pytest/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

from lib2to3.fixer_util import parenthesize

__version__ = "1.0.9"
__version__ = "1.0.10"

log = logging.getLogger('nose2pytest')

Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[bumpversion]
current_version = 1.0.10
files = setup.py README.rst nose2pytest/script.py
files = setup.py nose2pytest/script.py

0 comments on commit dde6b5a

Please sign in to comment.