Skip to content

Commit 1e065cb

Browse files
committed
add changelog and update workflow
1 parent 46d42e4 commit 1e065cb

File tree

7 files changed

+39
-24
lines changed

7 files changed

+39
-24
lines changed

.github/workflows/python-publish.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@ jobs:
2929
- name: Install dependencies
3030
run: |
3131
python -m pip install --upgrade pip
32-
pip install build
32+
pip install setuptools wheel twine
3333
- name: Build package
34-
run: python -m build
35-
- name: Publish package
36-
uses: pypa/gh-action-pypi-publish@release/v1
37-
with:
38-
user: __token__
39-
password: ${{ secrets.PYPI_API_TOKEN }}
34+
env:
35+
TWINE_USERNAME: __token__
36+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
37+
run: make release

CHANGELOG.md

Whitespace-only changes.

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.PHONY: clean-pyc clean-build test
2+
3+
clean: clean-build clean-pyc
4+
5+
clean-build:
6+
rm -fr build/
7+
rm -fr dist/
8+
rm -fr src/*.egg-info
9+
10+
clean-pyc:
11+
find . -name '*.pyc' -exec rm -f {} +
12+
find . -name '*.pyo' -exec rm -f {} +
13+
find . -name '*~' -exec rm -f {} +
14+
15+
build: clean
16+
python setup.py sdist bdist_wheel
17+
18+
release: build
19+
twine check dist/*
20+
twine upload dist/*

README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22

33
dotenv-vault-python allows your app to sync the `.env` file to the cloud. This means that you can work anywhere, in any machine, and in any cloud infrastructure with cofidence.
44

5+
- [Getting Started](#getting-started)
6+
57
## Getting Started
6-
```
8+
```shell
79
pip install python-dotenv-vault --no-cache-dir
810
```
9-
10-
11-
## Push to pipy
12-
```
13-
pip install twine
14-
python setup.py publish
15-
# enter username and password
16-
```

setup.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@
77
with open(os.path.join(dir, "src/dotenv", "__version__.py"), "r") as f:
88
exec(f.read(), src)
99

10-
with open("README.md", "r") as f:
11-
readme = f.read()
10+
def read_files(files):
11+
data = []
12+
for file in files:
13+
with open(file, encoding='utf-8') as f:
14+
data.append(f.read())
15+
return "\n".join(data)
1216

13-
# 'setup.py publish' shortcut.
14-
if sys.argv[-1] == "publish":
15-
os.system("python setup.py sdist")
16-
os.system(f"twine upload dist/python-dotenv-vault-{src['__version__']}.tar.gz")
17-
sys.exit()
17+
readme = read_files(['README.md', 'CHANGELOG.md'])
1818

1919
setup(
2020
name='python-dotenv-vault',
2121
description=src['__description__'],
22+
long_description=readme,
23+
long_description_content_type='text/markdown',
2224
version=src['__version__'],
2325
license=src['__license__'],
2426
author=src['__author__'],

src/dotenv/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
__title__ = "python-dotenv-vault"
88
__description__ = "Syncing your .env to the cloud."
99
__url__ = "https://github.com/dotenv-org/dotenv-vault-python"
10-
__version__ = "0.0.5"
10+
__version__ = "0.0.6"
1111
__author__ = "dotenv"
1212
__author_email__ = "[email protected]"
1313
__license__ = "MIT"

src/dotenv/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
from typing import Optional
33

44

5+
56
def load_dotenv():
67
print('loading dotenv-vault.')

0 commit comments

Comments
 (0)