File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,17 +40,31 @@ jobs:
4040 - name : Run lints
4141 run : ./scripts/lint
4242
43- upload :
43+ build :
4444 if : github.repository == 'stainless-sdks/cloudflare-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
4545 timeout-minutes : 10
46- name : upload
46+ name : build
4747 permissions :
4848 contents : read
4949 id-token : write
5050 runs-on : depot-ubuntu-24.04
5151 steps :
5252 - uses : actions/checkout@v4
5353
54+ - name : Install Rye
55+ run : |
56+ curl -sSf https://rye.astral.sh/get | bash
57+ echo "$HOME/.rye/shims" >> $GITHUB_PATH
58+ env :
59+ RYE_VERSION : ' 0.44.0'
60+ RYE_INSTALL_OPTION : ' --yes'
61+
62+ - name : Install dependencies
63+ run : rye sync --all-features
64+
65+ - name : Run build
66+ run : rye build
67+
5468 - name : Get GitHub OIDC Token
5569 id : github-oidc
5670 uses : actions/github-script@v6
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -exuo pipefail
33
4- RESPONSE=$( curl -X POST " $URL " \
4+ FILENAME=$( basename dist/* .whl)
5+
6+ RESPONSE=$( curl -X POST " $URL ?filename=$FILENAME " \
57 -H " Authorization: Bearer $AUTH " \
68 -H " Content-Type: application/json" )
79
@@ -12,13 +14,13 @@ if [[ "$SIGNED_URL" == "null" ]]; then
1214 exit 1
1315fi
1416
15- UPLOAD_RESPONSE=$( tar -cz . | curl -v -X PUT \
16- -H " Content-Type: application/gzip " \
17- --data-binary @- " $SIGNED_URL " 2>&1 )
17+ UPLOAD_RESPONSE=$( curl -v -X PUT \
18+ -H " Content-Type: binary/octet-stream " \
19+ --data-binary " @dist/ $FILENAME " " $SIGNED_URL " 2>&1 )
1820
1921if echo " $UPLOAD_RESPONSE " | grep -q " HTTP/[0-9.]* 200" ; then
2022 echo -e " \033[32mUploaded build to Stainless storage.\033[0m"
21- echo -e " \033[32mInstallation: pip install 'https://pkg.stainless.com/s/cloudflare-python/$SHA '\033[0m"
23+ echo -e " \033[32mInstallation: pip install 'https://pkg.stainless.com/s/cloudflare-python/$SHA / $FILENAME '\033[0m"
2224else
2325 echo -e " \033[31mFailed to upload artifact.\033[0m"
2426 exit 1
You can’t perform that action at this time.
0 commit comments