Skip to content

Commit b2fe4fc

Browse files
authored
Add token permissions to main CI for TestPyPi (#7)
Signed-off-by: Anuraag Agrawal <[email protected]>
1 parent c68064f commit b2fe4fc

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
name: CI
2-
permissions:
3-
contents: read
42
on:
53
push:
64
branches:
75
- main
86
pull_request:
97
workflow_dispatch:
108

9+
permissions:
10+
contents: read
11+
attestations: write
12+
id-token: write
13+
1114
concurrency:
1215
# Cancel in-progress jobs for PRs only
1316
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.sha || github.ref }}
@@ -101,14 +104,6 @@ jobs:
101104

102105
- run: uv sync --frozen
103106

104-
- name: Modify package name for TestPyPI
105-
run: |
106-
# The 'connect-python' name is claimed on TestPyPI. No big
107-
# deal, we can use a different name since this is just to test
108-
# publishing really.
109-
# TODO: Update now that this is in connectrpc
110-
sed -i 's/name = "connect-python"/name = "firetiger-connect-python"/' pyproject.toml
111-
112107
- run: uv build
113108

114109
- name: build codegen archives
@@ -133,5 +128,6 @@ jobs:
133128
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
134129
if: github.event_name != 'pull_request'
135130
with:
131+
repository-url: https://test.pypi.org/legacy/
136132
packages-dir: protoc-gen-connect-python/dist
137133
skip-existing: true

0 commit comments

Comments
 (0)