-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup.py fixed, added deploy job to workflow
- Loading branch information
1 parent
23ee412
commit 7c8f88d
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ on: | |
pull_request: | ||
branches: | ||
- main # Change this to the default branch of your repository | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
lint: | ||
|
@@ -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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters