File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515
1616 - name : Attempt to yank policyengine-uk 0.35.0
1717 env :
18- TWINE_USERNAME : __token__
19- TWINE_PASSWORD : ${{ secrets.PYPI }}
18+ PYPI_TOKEN : ${{ secrets.PYPI }}
2019 run : |
21- pip install twine
22- twine yank policyengine-uk 0.35.0 --reason "Test: verifying org secret has yank permissions" || echo "YANK FAILED (exit $?)"
20+ STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
21+ -X POST "https://pypi.org/pypi/policyengine-uk/0.35.0/yank" \
22+ -H "Authorization: Bearer $PYPI_TOKEN" \
23+ -d "reason=Test%3A+verifying+org+secret+has+yank+permissions")
24+ echo "HTTP status: $STATUS"
25+ if [ "$STATUS" = "200" ]; then
26+ echo "YANK SUCCEEDED - token has yank permissions"
27+ elif [ "$STATUS" = "403" ]; then
28+ echo "YANK FAILED 403 - token lacks permission or wrong scope"
29+ elif [ "$STATUS" = "401" ]; then
30+ echo "YANK FAILED 401 - token authentication failed"
31+ else
32+ echo "YANK FAILED with unexpected status $STATUS"
33+ fi
You can’t perform that action at this time.
0 commit comments