Skip to content

Commit 6471746

Browse files
committed
[Docs] Improved instructions about publishing a new release.
1 parent b9ad335 commit 6471746

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

DEVELOPMENT.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Requirements
44
```
5+
pyenv virtualenv 3.10.13 markov-solver-dev
6+
pyenv activate markov-solver-dev
57
pip install --upgrade pip
68
pip install -r requirements-dev.txt
79
```
@@ -23,28 +25,22 @@ python -m build
2325
```
2426

2527
## Publish
26-
Publish to PyPi test repo at https://test.pypi.org/project/markov-solver
27-
```
28-
python -m twine upload --repository testpypi dist/*
29-
```
28+
To publish a new release on PyPI, you need to create a new release on GitHub,
29+
which in turns triggers a GitHub action to publish the release on PyPI.
3030

31-
Publish to PyPi production repo at https://pypi.org/project/markov-solver
32-
```
33-
python -m twine upload dist/*
34-
```
31+
To this aim, you first need to store the PyPI API Token as a secret on GitHub:
3532

36-
## Configure secrets
3733
```
3834
PYPI_API_TOKEN_BODY=$(cat resources/secrets/pypi-token.txt)
3935
gh secret set "PYPI_API_TOKEN" \
4036
--app "actions" \
4137
--body "${PYPI_API_TOKEN_BODY}"
4238
```
4339

44-
## Publish a new release
4540
Create a draft release:
41+
4642
```
47-
VERSION="1.0.1"
43+
VERSION="1.0.0"
4844
gh release create v${VERSION} \
4945
--title "markov-solver v$VERSION" \
5046
--target mainline \
@@ -56,11 +52,25 @@ gh release create v${VERSION} \
5652
Make changes to the release notes.
5753

5854
Publish the release:
55+
5956
```
6057
gh release edit v${VERSION} --draft=false
6158
```
6259

63-
To delete a release from GitHub:
60+
If you need to delete the release from GitHub:
61+
6462
```
6563
gh release delete v${VERSION} --cleanup-tag --yes
64+
```
65+
66+
### Manually publish to PyPI test
67+
Publish to PyPi test repo at https://test.pypi.org/project/markov-solver
68+
```
69+
python -m twine upload --repository testpypi dist/*
70+
```
71+
72+
### Manually publish to PyPI prod
73+
Publish to PyPi production repo at https://pypi.org/project/markov-solver
74+
```
75+
python -m twine upload dist/*
6676
```

0 commit comments

Comments
 (0)