Skip to content

Commit

Permalink
chore(readme): add steps for pushing a new update
Browse files Browse the repository at this point in the history
  • Loading branch information
makkoncept committed Oct 9, 2022
1 parent 20042a9 commit 50d8a30
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Jump to:
- [Environment error](#could-not-install-package-due-to-environment-error)
- [ghs command not found](#ghs-command-not-found-even-after-installing)
- [How to contribute?](#how-to-contribute)
- [Steps for pushing a new update](#steps-for-pushing-a-new-update)
- [Changelog](#changelog)
- [Privacy Notice](#privacy-notice)
- [License](#license)
Expand Down Expand Up @@ -166,6 +167,60 @@ Most likely the place where the command is installed is not in the system [PATH]

Please see [Contributing guidelines](https://github.com/interviewstreet/ghs/blob/master/CONTRIBUTING.md) for more information.

## Steps for pushing a new update

1. Bump the version in `ghs/__init__.py` (we follow semantic versioning)

2. Create an annotated tag for this commit with the version name `git tag -a v1.2.3 -m "v1.2.3"`. You can use this to publish a new release on the project github page and the same can be used for maintaining the changelog.

3. Make sure you have [twine](https://pypi.org/project/twine/) and [build](https://pypi.org/project/build/) installed.

```
pip install build twine
```

3. Build the package

```
python -m build
```

This will create a source archive and a wheel inside the `dist` folder. You can inspect them to make sure that they contain the correct files.

4. Run twine sanity on the build files

```
twine check dist/*
```

5. First push the package on [TestPyPi](https://test.pypi.org/) so that you can test the updates without affecting the real PyPI index

```
twine upload -r testpypi dist/*
```

> Get the credentials for hackerrank dev PyPI account from karthik.
6. First push the package on [TestPyPi](https://test.pypi.org/) so that you can test the updates without affecting the real PyPI index

```
twine upload -r testpypi dist/*
```

> Get the credentials for hackerrank dev PyPI account from karthik.
Twine will list the package url on TestPyPI. You can test and confirm your changes by installing the package.

7. Finally, run the following command to upload the package to PyPI

```
twine upload dist/*
```

8. Treat yourself with a scoop of tender coconut.

## Changelog

You can checkout [Releases](https://github.com/interviewstreet/ghs/releases) for the changelog.
Expand Down

0 comments on commit 50d8a30

Please sign in to comment.