Skip to content

Commit

Permalink
setup.py fixed, added deploy job to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
uberfresh1914 committed Jan 29, 2024
1 parent 23ee412 commit 7c8f88d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
pull_request:
branches:
- main # Change this to the default branch of your repository
release:
types: [published]

jobs:
lint:
Expand Down Expand Up @@ -154,3 +156,30 @@ jobs:
with:
name: dist
path: dist/*.tar.gz

deploy:
needs: build_django_32
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment: release
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install Pipenv
run: python -m pip install --upgrade pipenv
- name: Install dependencies with Pipenv
run: |
pipenv install --dev
- name: Build package
run: pipenv run python -m build
- name: Publish package
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: dist/
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
long_description=long_description,
long_description_content_type='text/markdown',
url='http://github.com/pescheckit/django-country-kit',
packages=find_packages(),
packages=["django_country_kit"],
include_package_data=True,
install_requires=[
'Django>=3.0',
Expand Down

0 comments on commit 7c8f88d

Please sign in to comment.