Skip to content

Commit 8ec2066

Browse files
committed
update pypi permissions
1 parent ef5fbde commit 8ec2066

File tree

1 file changed

+56
-26
lines changed

1 file changed

+56
-26
lines changed

.github/workflows/release.yml

Lines changed: 56 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ on:
44
release:
55
types: [published]
66

7-
permissions:
8-
id-token: write
9-
contents: read
10-
117
jobs:
12-
build-and-publish:
8+
build-and-publish-ai:
139
runs-on: ubuntu-latest
10+
defaults:
11+
run:
12+
working-directory: ./python/thirdweb-ai
13+
environment:
14+
name: pypi
15+
url: https://pypi.org/p/thirdweb-ai
16+
permissions:
17+
contents: read
18+
id-token: write
19+
1420
steps:
1521
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1622
with:
@@ -25,30 +31,54 @@ jobs:
2531
enable-cache: true
2632
cache-dependency-glob: "uv.lock" # Update cache if uv.lock changes
2733

34+
- name: Install the project
35+
run: uv sync
36+
2837
- name: Build thirdweb-mcp
29-
run: |
30-
cd python/thirdweb-mcp
31-
uv build
32-
33-
- name: Build thirdweb-ai
34-
run: |
35-
cd python/thirdweb-ai
36-
uv build
37-
38-
- name: Publish AI to PyPI
39-
uses: pypa/gh-action-pypi-publish@release/v1
38+
run: uv build
39+
40+
- name: Publish package
41+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
4042
with:
4143
user: __token__
42-
password: ${{ secrets.PYPI_API_TOKEN }}
43-
packages-dir: python/thirdweb-ai/dist
44-
verbose: true
45-
skip-existing: true
44+
password: ${{ secrets.PYPI_API_KEY }}
45+
packages-dir: python/thirdweb-ai/dist/
46+
47+
build-and-publish-mcp:
48+
runs-on: ubuntu-latest
49+
defaults:
50+
run:
51+
working-directory: ./python/thirdweb-mcp
52+
environment:
53+
name: pypi
54+
url: https://pypi.org/p/thirdweb-mcp
55+
permissions:
56+
contents: read
57+
id-token: write
58+
59+
steps:
60+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61+
with:
62+
fetch-depth: 0
63+
64+
- name: Install uv
65+
uses: astral-sh/setup-uv@22695119d769bdb6f7032ad67b9bca0ef8c4a174 # v5
66+
67+
- name: Install Python
68+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
69+
with:
70+
enable-cache: true
71+
cache-dependency-glob: "uv.lock" # Update cache if uv.lock changes
72+
73+
- name: Install the project
74+
run: uv sync
75+
76+
- name: Build thirdweb-mcp
77+
run: uv build
4678

47-
- name: Publish MCP to PyPI
48-
uses: pypa/gh-action-pypi-publish@release/v1
79+
- name: Publish package
80+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
4981
with:
5082
user: __token__
51-
password: ${{ secrets.PYPI_API_TOKEN }}
52-
packages-dir: python/thirdweb-mcp/dist
53-
verbose: true
54-
skip-existing: true
83+
password: ${{ secrets.PYPI_API_KEY }}
84+
packages-dir: python/thirdweb-mcp/dist/

0 commit comments

Comments
 (0)