File tree 5 files changed +45
-1
lines changed
5 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 18
18
with :
19
19
repo : ${{ github.event.repository.full_name }}
20
20
stainless-api-key : ${{ secrets.STAINLESS_API_KEY }}
21
+
22
+ - name : Set up Python
23
+ if : ${{ steps.release.outputs.releases_created }}
24
+ uses : actions/setup-python@v4
25
+ with :
26
+ python-version : ' 3.7'
27
+
28
+ - name : Publish to PyPI
29
+ if : ${{ steps.release.outputs.releases_created }}
30
+ run : |
31
+ pipx install poetry
32
+ bash ./bin/publish-pypi
33
+ env :
34
+ PYPI_TOKEN : ${{ secrets.ANTHROPIC_PYPI_TOKEN }}
Original file line number Diff line number Diff line change
1
+ # workflow for re-running publishing to PyPI in case it fails for some reason
2
+ # you can run this workflow by navigating to https://www.github.com/anthropics/anthropic-sdk-python/actions/workflows/publish-pypi.yml
3
+ name : Publish PyPI
4
+ on :
5
+ workflow_dispatch :
6
+
7
+ jobs :
8
+ publish :
9
+ name : publish
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - uses : actions/checkout@v3
14
+
15
+ - name : Set up Python
16
+ uses : actions/setup-python@v4
17
+ with :
18
+ python-version : ' 3.7'
19
+
20
+ - name : Publish to PyPI
21
+ run : |
22
+ pipx install poetry
23
+ bash ./bin/publish-pypi
24
+ env :
25
+ PYPI_TOKEN : ${{ secrets.ANTHROPIC_PYPI_TOKEN }}
Original file line number Diff line number Diff line change 17
17
bash ./bin/check-release-environment
18
18
env :
19
19
STAINLESS_API_KEY : ${{ secrets.STAINLESS_API_KEY }}
20
+ PYPI_TOKEN : ${{ secrets.ANTHROPIC_PYPI_TOKEN }}
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ if [ -z "${STAINLESS_API_KEY}" ]; then
6
6
errors+=(" The STAINLESS_API_KEY secret has not been set. Please contact Stainless for an API key & set it in your organisation secrets on GitHub." )
7
7
fi
8
8
9
+ if [ -z " ${PYPI_TOKEN} " ]; then
10
+ errors+=(" The ANTHROPIC_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organisation secrets." )
11
+ fi
12
+
9
13
len=${# errors[@]}
10
14
11
15
if [[ len -gt 0 ]]; then
Original file line number Diff line number Diff line change 58
58
}
59
59
],
60
60
"reviewers" : [
61
- " RobertCraigie "
61
+ " @anthropics/sdk "
62
62
],
63
63
"release-type" : " python" ,
64
64
"extra-files" : [
You can’t perform that action at this time.
0 commit comments