Skip to content

Commit 61ea691

Browse files
feat(api): config oidc publishing
1 parent e83b1c6 commit 61ea691

6 files changed

Lines changed: 13 additions & 17 deletions

File tree

.github/workflows/publish-pypi.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ jobs:
1212
publish:
1313
name: publish
1414
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
id-token: write
1518

1619
steps:
1720
- uses: actions/checkout@v4
@@ -24,5 +27,3 @@ jobs:
2427
- name: Publish to PyPI
2528
run: |
2629
bash ./bin/publish-pypi
27-
env:
28-
PYPI_TOKEN: ${{ secrets.TABSTACK_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.github/workflows/release-doctor.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,3 @@ jobs:
1717
- name: Check release environment
1818
run: |
1919
bash ./bin/check-release-environment
20-
env:
21-
PYPI_TOKEN: ${{ secrets.TABSTACK_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 4
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mozilla%2Ftabstack-5aeb0321dfa491e03f95682879119e6fe62f3777f7026c85b0fd84ffbcfe957c.yml
33
openapi_spec_hash: 2cdab5faacc1cb28545a9faf4459b629
4-
config_hash: b91d7b237299ba0989d7126db577c05c
4+
config_hash: 1bc6137228160bbee20af307fae135e5

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,10 @@ The full API of this library can be found in [api.md](api.md).
2525
## Installation
2626

2727
```sh
28-
# install from the production repo
29-
pip install git+ssh://git@github.com/Mozilla-Ocho/tabstack-python.git
28+
# install from PyPI
29+
pip install tabstack
3030
```
3131

32-
> [!NOTE]
33-
> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install tabstack`
34-
3532
## Usage
3633

3734
The full API of this library can be found in [api.md](api.md).
@@ -88,8 +85,8 @@ By default, the async client uses `httpx` for HTTP requests. However, for improv
8885
You can enable this by installing `aiohttp`:
8986

9087
```sh
91-
# install from the production repo
92-
pip install 'tabstack[aiohttp] @ git+ssh://git@github.com/Mozilla-Ocho/tabstack-python.git'
88+
# install from PyPI
89+
pip install tabstack[aiohttp]
9390
```
9491

9592
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:

bin/check-release-environment

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
errors=()
44

5-
if [ -z "${PYPI_TOKEN}" ]; then
6-
errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
7-
fi
8-
95
lenErrors=${#errors[@]}
106

117
if [[ lenErrors -gt 0 ]]; then

bin/publish-pypi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ set -eux
44
rm -rf dist
55
mkdir -p dist
66
uv build
7-
uv publish --token=$PYPI_TOKEN
7+
if [ -n "${PYPI_TOKEN:-}" ]; then
8+
uv publish --token=$PYPI_TOKEN
9+
else
10+
uv publish
11+
fi

0 commit comments

Comments
 (0)