Skip to content

Commit 7570888

Browse files
authored
Merge pull request #1673 from basetenlabs/bump-version-0.9.96
Release 0.9.96
2 parents 458c257 + c41b36c commit 7570888

23 files changed

+4746
-116
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build and Release baseten-inference-client
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
paths:
9+
- "baseten-inference-client/**"
10+
tags:
11+
- "*"
12+
pull_request:
13+
paths:
14+
- "baseten-inference-client/**"
15+
workflow_dispatch:
16+
inputs:
17+
publish_pypi:
18+
description: "Publish to PyPI? (true/false)"
19+
required: false
20+
default: "false"
21+
22+
jobs:
23+
build-package:
24+
uses: ./.github/workflows/build-maturin.yml
25+
with:
26+
folder: baseten-inference-client
27+
publish_pypi: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.publish_pypi == 'true' || startsWith(github.ref, 'refs/tags/') }}
28+
secrets:
29+
PYPI_TOKEN: ${{ secrets.BASETEN_INFERENCE_CLIENT_PYPI_API_TOKEN }}

.github/workflows/truss-transfer-build-maturin.yaml renamed to .github/workflows/build-maturin.yml

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,21 @@
66
name: truss-transfer-build-maturin
77

88
on:
9-
push:
10-
branches:
11-
- main
12-
- master
13-
paths:
14-
- "truss-transfer/**"
15-
tags:
16-
- "*" # Still runs on all tags regardless of directory changes
17-
pull_request:
18-
paths:
19-
- "truss-transfer/**"
20-
workflow_dispatch:
9+
workflow_call:
10+
inputs:
11+
folder:
12+
description: "The folder containing the package to build."
13+
required: true
14+
type: string
15+
publish_pypi: # New input parameter
16+
description: "Whether to publish the package to PyPI."
17+
required: false
18+
type: boolean
19+
default: false
20+
secrets:
21+
PYPI_TOKEN:
22+
description: "The PyPI token for publishing."
23+
required: true # Still required if publish_pypi is true
2124

2225
permissions:
2326
contents: read
@@ -48,7 +51,7 @@ jobs:
4851
- name: Build wheels
4952
uses: PyO3/maturin-action@v1
5053
with:
51-
working-directory: truss-transfer
54+
working-directory: ${{ inputs.folder }}
5255
target: ${{ matrix.platform.target }}
5356
args: --release --out dist --find-interpreter
5457
sccache: "false"
@@ -66,7 +69,7 @@ jobs:
6669
uses: PyO3/maturin-action@v1
6770
if: ${{ matrix.platform.target != 'aarch64' || matrix.platform.target != 'armv7' }}
6871
with:
69-
working-directory: truss-transfer
72+
working-directory: ${{ inputs.folder }}
7073
target: ${{ matrix.platform.target }}
7174
args: --release --out dist -i python3.13t
7275
sccache: "false"
@@ -86,7 +89,7 @@ jobs:
8689
uses: actions/upload-artifact@v4
8790
with:
8891
name: wheels-linux-${{ matrix.platform.target }}
89-
path: truss-transfer/dist
92+
path: ${{ inputs.folder }}/dist
9093

9194
musllinux:
9295
runs-on: ${{ matrix.platform.runner }}
@@ -109,15 +112,15 @@ jobs:
109112
- name: Build wheels
110113
uses: PyO3/maturin-action@v1
111114
with:
112-
working-directory: truss-transfer
115+
working-directory: ${{ inputs.folder }}
113116
target: ${{ matrix.platform.target }}
114117
args: --release --out dist --find-interpreter
115118
sccache: "false"
116119
manylinux: musllinux_1_2
117120
- name: Build free-threaded wheels
118121
uses: PyO3/maturin-action@v1
119122
with:
120-
working-directory: truss-transfer
123+
working-directory: ${{ inputs.folder }}
121124
target: ${{ matrix.platform.target }}
122125
args: --release --out dist -i python3.13t
123126
sccache: "false"
@@ -126,7 +129,7 @@ jobs:
126129
uses: actions/upload-artifact@v4
127130
with:
128131
name: wheels-musllinux-${{ matrix.platform.target }}
129-
path: truss-transfer/dist
132+
path: ${{ inputs.folder }}/dist
130133

131134
windows:
132135
runs-on: ${{ matrix.platform.runner }}
@@ -146,7 +149,7 @@ jobs:
146149
- name: Build wheels
147150
uses: PyO3/maturin-action@v1
148151
with:
149-
working-directory: truss-transfer
152+
working-directory: ${{ inputs.folder }}
150153
target: ${{ matrix.platform.target }}
151154
args: --release --out dist --find-interpreter
152155
sccache: "false"
@@ -161,7 +164,7 @@ jobs:
161164
uses: actions/upload-artifact@v4
162165
with:
163166
name: wheels-windows-${{ matrix.platform.target }}
164-
path: truss-transfer/dist
167+
path: ${{ inputs.folder }}/dist
165168

166169
macos:
167170
runs-on: ${{ matrix.platform.runner }}
@@ -180,22 +183,22 @@ jobs:
180183
- name: Build wheels
181184
uses: PyO3/maturin-action@v1
182185
with:
183-
working-directory: truss-transfer
186+
working-directory: ${{ inputs.folder }}
184187
target: ${{ matrix.platform.target }}
185188
args: --release --out dist --find-interpreter
186189
sccache: "false"
187190
- name: Build free-threaded wheels
188191
uses: PyO3/maturin-action@v1
189192
with:
190-
working-directory: truss-transfer
193+
working-directory: ${{ inputs.folder }}
191194
target: ${{ matrix.platform.target }}
192195
args: --release --out dist -i python3.13t
193196
sccache: "false"
194197
- name: Upload wheels
195198
uses: actions/upload-artifact@v4
196199
with:
197200
name: wheels-macos-${{ matrix.platform.target }}
198-
path: truss-transfer/dist
201+
path: ${{ inputs.folder }}/dist
199202

200203
sdist:
201204
runs-on: ubuntu-latest
@@ -204,18 +207,20 @@ jobs:
204207
- name: Build sdist
205208
uses: PyO3/maturin-action@v1
206209
with:
207-
working-directory: truss-transfer
210+
working-directory: ${{ inputs.folder }}
208211
command: sdist
209212
args: --out dist
210213
- name: Upload sdist
211214
uses: actions/upload-artifact@v4
212215
with:
213216
name: wheels-sdist
214-
path: truss-transfer/dist
217+
path: ${{ inputs.folder }}/dist
215218

216219
release:
217220
name: Release
218221
runs-on: ubuntu-latest
222+
# This job will run if triggered by a tag or manually.
223+
# The decision to publish within this job is now controlled by inputs.publish_pypi
219224
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
220225
needs: [linux, musllinux, windows, macos, sdist]
221226
permissions:
@@ -232,10 +237,10 @@ jobs:
232237
with:
233238
subject-path: "wheels-*/*"
234239
- name: Publish to PyPI
235-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
240+
if: ${{ inputs.publish_pypi }} # Use the input parameter here
236241
uses: PyO3/maturin-action@v1
237242
env:
238-
MATURIN_PYPI_TOKEN: ${{ secrets.TRUSS_TRANSFER_PYPI_API_TOKEN }}
243+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
239244
with:
240245
command: upload
241246
args: --non-interactive --skip-existing wheels-*/*
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build and Release truss-transfer
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
paths:
9+
- "truss-transfer/**"
10+
tags:
11+
- "*"
12+
pull_request:
13+
paths:
14+
- "truss-transfer/**"
15+
workflow_dispatch:
16+
inputs:
17+
publish_pypi:
18+
description: "Publish to PyPI? (true/false)"
19+
required: false
20+
default: "false"
21+
22+
jobs:
23+
build-package:
24+
uses: ./.github/workflows/build-maturin.yml
25+
with:
26+
folder: truss-transfer
27+
publish_pypi: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.publish_pypi == 'true' || startsWith(github.ref, 'refs/tags/') }}
28+
secrets:
29+
PYPI_TOKEN: ${{ secrets.TRUSS_TRANSFER_PYPI_API_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,4 @@ yarn.lock
7979
.hypothesis
8080

8181
truss-transfer/target/
82+
baseten-inference-client/target/

0 commit comments

Comments
 (0)