Skip to content

Commit c3a2fda

Browse files
ci: use PYPI_TOKEN for publishing instead of OIDC trusted publisher
Switch from PyPI OIDC trusted publishing to PYPI_TOKEN secret. OIDC requires PyPI Owner access to configure, which is currently blocked pending ownership transfer. PYPI_TOKEN was already configured in the repo from the v1 Speakeasy workflow. Co-Authored-By: AJ Steers <aj@airbyte.io>
1 parent 6b2f771 commit c3a2fda

2 files changed

Lines changed: 8 additions & 18 deletions

File tree

.github/workflows/pre-release-command.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,9 @@ jobs:
5353
pre_release:
5454
name: Build & Publish Pre-Release
5555
runs-on: ubuntu-latest
56-
environment:
57-
name: pypi
58-
url: https://pypi.org/project/airbyte-api/
5956
permissions:
6057
contents: write
6158
pull-requests: write
62-
id-token: write
6359
steps:
6460
# ── Slash command: post starting comment ────────────────────────
6561
- name: Authenticate as GitHub App
@@ -129,7 +125,9 @@ jobs:
129125
run: uv build
130126

131127
- name: Publish to PyPI
132-
uses: pypa/gh-action-pypi-publish@release/v1
128+
run: uv publish
129+
env:
130+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
133131

134132
# ── Tag the commit ──────────────────────────────────────────────
135133
- name: Create and push tag

.github/workflows/publish.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
# PyPI Publish Workflow
22
#
33
# Triggered when a GitHub Release is published (draft → published).
4-
# Builds the Python package and uploads it to PyPI using OIDC trusted publishing.
4+
# Builds the Python package and uploads it to PyPI using PYPI_TOKEN.
55
#
66
# Prerequisites:
7-
# - PyPI trusted publisher configured for this repository:
8-
# https://docs.pypi.org/trusted-publishers/creating-a-project-through-oidc/
9-
# Owner: airbytehq
10-
# Repository: airbyte-api-python-sdk
11-
# Workflow: publish.yml
12-
# Environment: pypi
7+
# - PYPI_TOKEN secret configured in the repository
138

149
name: Publish to PyPI
1510

@@ -24,11 +19,6 @@ jobs:
2419
publish:
2520
name: Build & Publish to PyPI
2621
runs-on: ubuntu-latest
27-
environment:
28-
name: pypi
29-
url: https://pypi.org/project/airbyte-api/
30-
permissions:
31-
id-token: write
3222
steps:
3323
- name: Checkout repository
3424
uses: actions/checkout@v4
@@ -42,4 +32,6 @@ jobs:
4232
run: uv build
4333

4434
- name: Publish to PyPI
45-
uses: pypa/gh-action-pypi-publish@release/v1
35+
run: uv publish
36+
env:
37+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)