File tree Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -35,17 +35,31 @@ jobs:
35
35
- name : Run lints
36
36
run : ./scripts/lint
37
37
38
- upload :
38
+ build :
39
39
if : github.repository == 'stainless-sdks/openlayer-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
40
40
timeout-minutes : 10
41
- name : upload
41
+ name : build
42
42
permissions :
43
43
contents : read
44
44
id-token : write
45
45
runs-on : depot-ubuntu-24.04
46
46
steps :
47
47
- uses : actions/checkout@v4
48
48
49
+ - name : Install Rye
50
+ run : |
51
+ curl -sSf https://rye.astral.sh/get | bash
52
+ echo "$HOME/.rye/shims" >> $GITHUB_PATH
53
+ env :
54
+ RYE_VERSION : ' 0.44.0'
55
+ RYE_INSTALL_OPTION : ' --yes'
56
+
57
+ - name : Install dependencies
58
+ run : rye sync --all-features
59
+
60
+ - name : Run build
61
+ run : rye build
62
+
49
63
- name : Get GitHub OIDC Token
50
64
id : github-oidc
51
65
uses : actions/github-script@v6
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
set -exuo pipefail
3
3
4
- RESPONSE=$( curl -X POST " $URL " \
4
+ FILENAME=$( basename dist/* .whl)
5
+
6
+ RESPONSE=$( curl -X POST " $URL ?filename=$FILENAME " \
5
7
-H " Authorization: Bearer $AUTH " \
6
8
-H " Content-Type: application/json" )
7
9
@@ -12,13 +14,13 @@ if [[ "$SIGNED_URL" == "null" ]]; then
12
14
exit 1
13
15
fi
14
16
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 )
18
20
19
21
if echo " $UPLOAD_RESPONSE " | grep -q " HTTP/[0-9.]* 200" ; then
20
22
echo -e " \033[32mUploaded build to Stainless storage.\033[0m"
21
- echo -e " \033[32mInstallation: pip install --pre 'https://pkg.stainless.com/s/openlayer-python/$SHA '\033[0m"
23
+ echo -e " \033[32mInstallation: pip install 'https://pkg.stainless.com/s/openlayer-python/$SHA / $FILENAME '\033[0m"
22
24
else
23
25
echo -e " \033[31mFailed to upload artifact.\033[0m"
24
26
exit 1
You can’t perform that action at this time.
0 commit comments