ci: add .deepsource.toml #23
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
name: CI/CD pipeline | |
on: | |
push: | |
branches: | |
- "*" | |
jobs: | |
tests: | |
uses: NextGenContributions/cicd-pipeline/.github/workflows/test.yml@main | |
with: | |
project_name: django-ninja-crudl | |
release: | |
uses: NextGenContributions/cicd-pipeline/.github/workflows/release.yml@main | |
with: | |
release_branch: main | |
needs: tests | |
permissions: | |
id-token: write | |
contents: write | |
publish-to-testpypi: | |
# 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}', 'django-ninja-crudl') }} | |
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/ | |