From bf30b2e2a1caa8394ee79f9f061f9a5dc47ad15f Mon Sep 17 00:00:00 2001 From: Eliyas Hossain Date: Mon, 1 Jul 2024 13:22:35 +0600 Subject: [PATCH] Added release.yml --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ setup.py | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e83f2f2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Upload to PyPI + +on: + release: + types: [published] + +jobs: + upload: + runs-on: ubuntu-latest + + environment: + name: pypi.org + url: https://pypi.org/project/dxh-py/ + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install build tools + run: python -m pip install --upgrade pip build + + - name: Build distributions + run: python -m build --sdist --wheel --outdir dist/ + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/setup.py b/setup.py index fe96043..88bf870 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='dxh_py', - version='0.1.0', + version='0.0.1', packages=find_packages(), install_requires=[ 'cookiecutter>=2.0.0'