Skip to content

Commit

Permalink
fix: Temporarily stop using publish-pypi.yml reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
phuongfi91 committed Nov 20, 2024
1 parent 0323ce8 commit e371d3c
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,29 @@ jobs:
contents: write

publish-to-testpypi:
uses: NextGenContributions/cicd-pipeline/.github/workflows/publish-pypi.yml@main
with:
project_name: django2pydantic
# TODO(phuongfi91): Revisit this once Reusable Workflow is supported for Trusted Publishing
# Ref: https://github.com/pypi/warehouse/issues/11096
# Workflow: NextGenContributions/cicd-pipeline/.github/workflows/publish-pypi.yml@main
name: Publish Python 🐍 distribution 📦 to TestPyPI
runs-on: ubuntu-latest
if: ${{ needs.release.outputs.released == 'true' }}
needs:
- release
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

environment:
name: testpypi
url: ${{ format('https://test.pypi.org/p/{0}', 'django2pydantic') }}

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

0 comments on commit e371d3c

Please sign in to comment.