Skip to content

Commit

Permalink
Try publishing to TestPyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Jan 6, 2024
1 parent 9527048 commit fc7bca1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: CD

on:
workflow_dispatch:
inputs:
deployment:
description: "Whether to deploy to 'testpypi' or 'pypi', defaults to 'none'"
required: true
default: 'none'
release:
types:
- published
Expand Down Expand Up @@ -325,7 +330,7 @@ jobs:
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
# if: github.event_name == 'release' && github.event.action == 'published'

steps:
- name: Download all artifacts
Expand All @@ -337,7 +342,9 @@ jobs:
mv source_distribution/* windows_wheels/* repaired_linux_wheels/* combined_macos_wheels/* upload/
- uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'release' && github.event.action == 'published'
# if: github.event_name == 'release' && github.event.action == 'published'
# run on workflow dispatch and if the deployment input is set to testpypi
if: github.event == 'workflow_dispatch' && github.event.inputs.deployment == 'testpypi'
with:
# Remember to tell (test-)pypi about this repo before publishing
# Remove this line to publish to PyPI
Expand Down

0 comments on commit fc7bca1

Please sign in to comment.