Skip to content

Commit 7328d02

Browse files
authored
revert "chore(pypi): use trusted publishing" (#11459)
reverts commit 3cb4c01
1 parent 8eb705b commit 7328d02

3 files changed

Lines changed: 5 additions & 18 deletions

File tree

‎.github/workflows/cd.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ on:
88
jobs:
99
check-version:
1010
runs-on: ubuntu-latest
11-
environment: pypi
12-
permissions:
11+
permissions:
1312
pull-requests: write
1413
contents: write
15-
id-token: write
1614
steps:
1715
- uses: actions/checkout@v4
1816
with:
@@ -24,6 +22,8 @@ jobs:
2422
python-version: "3.11"
2523
enable-cache: "false"
2624
- name: Push tag for each updated package
25+
env:
26+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
2727
run: |
2828
git config --global user.name "SDK Releaser Bot"
2929
git config --global user.email "noreply@stackit.de"

‎RELEASE.md‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,6 @@
44

55
A release of the whole SDK should be created at least every 2 weeks.
66

7-
## PyPI trusted publishing setup
8-
9-
The [CD workflow](.github/workflows/cd.yaml) publishes the core package and service
10-
packages with `uv publish --trusted-publishing always`. GitHub Actions OIDC is
11-
required; no long-lived PyPI token is used. Keep the workflow filename `cd.yaml`
12-
and the job's environment `pypi` in sync with the PyPI publisher configuration.
13-
14-
The job grants `id-token: write` so uv can obtain short-lived publishing
15-
credentials.
16-
17-
References: [PyPI trusted publishers](https://docs.pypi.org/trusted-publishers/adding-a-publisher/),
18-
[uv publishing from GitHub Actions](https://docs.astral.sh/uv/guides/integration/github/#publishing-to-pypi),
19-
[GitHub environment options](https://docs.github.com/en/actions/reference/workflows-and-actions/deployments-and-environments).
20-
217
## Release creation
228

239
### Single service
@@ -52,3 +38,4 @@ The SDK is split into all the different STACKIT [services](https://github.com/st
5238
4. Copy the changelog entries for the new release from the `CHANGELOG.md` file in the root directory of the repository (see [here](https://github.com/stackitcloud/stackit-sdk-python/blob/608176ab8cdfa60a3cfb09da49de0b1aba5fea84/CHANGELOG.md)) to your clipboard.
5339
5. Go to the [releases page](https://github.com/stackitcloud/stackit-sdk-python/releases) on GitHub and create a new release. Select the git tag you just created.
5440
6. Before creating the GitHub release, add the *Highlights* heading at the top of the markdown description and paste the changelog entries from your clipboard (see [previous releases](https://github.com/stackitcloud/stackit-sdk-python/releases/tag/release-2025-03-27) to see what it should look like). Then create and publish the GitHub release.
41+

‎scripts/cd.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ for file in $(find . -print | sed 's|^./||' | grep -E "(^services/[^/]+/pyprojec
1919
git push origin tag $expected_tag
2020
cd $dirpath
2121
uv build
22-
uv publish --trusted-publishing always
22+
uv publish --username="__token__" --password="$PYPI_TOKEN"
2323
cd $GITHUB_WORKSPACE
2424
fi
2525
done

0 commit comments

Comments
 (0)