Skip to content

Commit bcbea8b

Browse files
committed
Use poetry to build and publish the package
1 parent 2694316 commit bcbea8b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
steps:
2626
- name: Checkout 🛎️
2727
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
2830
- name: Set up Python 🐍
2931
uses: actions/setup-python@v5
3032
with:
@@ -54,18 +56,15 @@ jobs:
5456
with:
5557
github-token: ${{ secrets.GITHUB_TOKEN }}
5658
path-to-lcov: ./coverage.lcov
57-
- name: Build the binary and source packages 🏗️
58-
run: poetry build
5959
- name: Generate CycloneDX SBOM artifacts 📃
6060
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
6161
run: |
6262
poetry run cyclonedx-py poetry --all-extras --of JSON -o django-saml2-auth-${{ github.ref_name }}.cyclonedx.json
63-
- name: Publish package to PyPI 🎉
63+
- name: Build and publish package to PyPI 🎉
6464
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
65-
uses: pypa/gh-action-pypi-publish@release/v1
66-
with:
67-
user: __token__
68-
password: ${{ secrets.PYPI_API_TOKEN }}
65+
run: |
66+
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
67+
poetry publish --build
6968
- name: Create release and add artifacts 🚀
7069
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
7170
uses: softprops/action-gh-release@v1

0 commit comments

Comments
 (0)