Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
build_and_publish:
name: "Publish ccf package to PyPi"
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write

steps:
- uses: actions/checkout@v6
Expand All @@ -21,15 +24,12 @@ jobs:

- name: Fetch PyPi Package from release
run: |
cd python
mkdir -p dist
cd dist
RELEASE_WHEEL_URL=$(curl -s https://api.github.com/repos/microsoft/ccf/releases/tags/ccf-${{steps.tref.outputs.version}} | jq -r '.assets[] | select(.name|test("ccf-.*.whl")) | .browser_download_url')
wget ${RELEASE_WHEEL_URL}

- name: Publish PyPi Package to https://pypi.org/project/ccf/
run: |
set -ex
cd python
python3 -m venv env
source ./env/bin/activate
pip install twine
twine upload -u __token__ -p ${{ secrets.PYPI_TOKEN }} --skip-existing *.whl
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
with:
skip-existing: true