Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github/workflows: deploy to TestPyPI
- Loading branch information
1 parent
9546d53
commit 776bc2e
Showing
2 changed files
with
37 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
in name: Upload Djangoviz Python Package to PyPI | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
production-pypi: | ||
type: boolean | ||
description: "Should this deployment go to PyPI?" | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
cache: 'pipenv' | ||
- name: Install pipenv | ||
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python | ||
- name: Install dependencies | ||
run: pipenv sync --dev | ||
- name: Build package | ||
run: pipenv run python -m build | ||
- name: Publish package to TestPyPI | ||
uses: pypa/gh-action-pypi-publish@v1.4.2 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
- name: Publish package to PyPI | ||
uses: pypa/gh-action-pypi-publish@v1.4.2 | ||
if: github.event.inputs.production-pypi == 'true' |
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