Skip to content

Commit 3046a10

Browse files
cosmicBboym-richards
authored andcommitted
update publish ci to use pypi publisher (unionai-oss#1922)
* testing publish ci Signed-off-by: cosmicBboy <[email protected]> * debug Signed-off-by: cosmicBboy <[email protected]> * finalize publish workflow Signed-off-by: cosmicBboy <[email protected]> --------- Signed-off-by: cosmicBboy <[email protected]> Signed-off-by: Matt Richards <[email protected]>
1 parent 478f028 commit 3046a10

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

.github/workflows/publish.yml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@ name: Publish Python Package
33
on:
44
release:
55
types: [published]
6-
push:
7-
branches:
8-
- update-publish-ci
96

107
jobs:
11-
publish:
8+
build_wheel_and_sdist:
129
runs-on: ubuntu-latest
1310
steps:
1411
- uses: actions/checkout@v4
@@ -25,10 +22,25 @@ jobs:
2522
- name: Build wheel and sdist
2623
run: python -m build
2724
shell: bash
28-
- name: Build and publish
29-
run: ls -la .
30-
# - name: Build and publish
31-
# env:
32-
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
33-
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
34-
# run: twine upload dist/*
25+
- uses: actions/upload-artifact@v4
26+
with:
27+
name: pandera-artifact
28+
path: ./dist
29+
30+
pypi-publish:
31+
name: Upload release to PyPI
32+
needs: [build_wheel_and_sdist]
33+
runs-on: ubuntu-latest
34+
permissions:
35+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
36+
environment: release
37+
steps:
38+
- uses: actions/download-artifact@v4
39+
with:
40+
name: pandera-artifact
41+
path: dist
42+
- run: ls dist
43+
- name: Publish package distributions to PyPI
44+
uses: pypa/gh-action-pypi-publish@release/v1
45+
with:
46+
attestations: false

0 commit comments

Comments
 (0)