Skip to content

Commit 3bbac12

Browse files
committed
Add a README for the GitHub Action
1 parent ea3fbc9 commit 3bbac12

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,37 @@
1-
# pypi-action
2-
This is a GitHub Action
1+
# PyPI publish GitHub Action
2+
This action allows you to upload your [Python distribution package](
3+
https://packaging.python.org/glossary/#term-distribution-package) to
4+
PYPI.
5+
6+
7+
## Usage
8+
To use the action simply add the following lines in the end of your
9+
`.github/main.workflow`.
10+
11+
```hcl
12+
action "Upload Python dist to PyPI" {
13+
uses = "re-actors/pypi-action@master"
14+
env = {
15+
TWINE_USERNAME = "f'{your_project}-bot'"
16+
}
17+
secrets = ["TWINE_PASSWORD"]
18+
}
19+
```
20+
21+
N.B. Use a valid tag, or branch, or commit SHA instead
22+
of `master` to pin the action to use a specific version of it.
23+
24+
25+
### Environment Variables and Secrets
26+
- **`TWINE_USERNAME`**: set this one to the username used to authenticate
27+
against PyPI. _It is recommended to have a separate user account like
28+
`f'{your_project}-bot'` having the lowest privileges possible on your
29+
target dist page._
30+
- **`TWINE_PASSWORD`**: it's a password for the account used in
31+
`TWINE_USERNAME` env var. **ATTENTION! WARNING! When adding this value
32+
to the Action node in your workflow, use SECRETS, not normal env vars.**
33+
34+
35+
## License
36+
The Dockerfile and associated scripts and documentation in this project
37+
are released under the [GPL v3](LICENSE).

0 commit comments

Comments
 (0)