Skip to content

Commit

Permalink
Add release actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
thatbudakguy committed Sep 1, 2023
1 parent 0097ba4 commit f566af2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 24 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: release

on: [release]

jobs:
publish:
name: publish to pyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- run: pip install -r dev-requirements.txt
- run: python setup.py sdist bdist_wheel
- run: twine upload dist/*
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
26 changes: 2 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,32 +153,10 @@ $ python -m unittest

## releases

**make sure the version number in `dphon/__init__.py` is correct!**

if there are any built files in `dist/` from older releases, remove them before
you start this process:

```sh
$ rm dist/*
```

to build a source archive and distribution for a release:

```sh
$ python setup.py sdist bdist_wheel
```

to publish the release on [test PyPI](https://test.pypi.org/) (useful for making sure everything worked):

```sh
$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
```
the package is built and published to pyPI automatically using `twine` when using GitHub's release functionality.

if everything is OK, publish the package to PyPI:
**make sure the version number in `dphon/__init__.py` is correct!**

```sh
$ twine upload dist/*
```
<hr/>
<sup id="note1">1</sup> Schuessler, Axel (2007), _ABC Etymological Dictionary of Old Chinese_, Honolulu: University of Hawaii Press, ISBN 978-0-8248-2975-9.

Expand Down

0 comments on commit f566af2

Please sign in to comment.