Skip to content

Commit

Permalink
.github/workflows: deploy to TestPyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
yonidavidson committed May 10, 2023
1 parent 9546d53 commit 776bc2e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/djangoviz-PyPI.yaml
@@ -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'
1 change: 0 additions & 1 deletion .github/workflows/djangoviz-test.yaml
Expand Up @@ -13,7 +13,6 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down

0 comments on commit 776bc2e

Please sign in to comment.