Skip to content

Commit cc74aa5

Browse files
Update python-publish.yml
1 parent 369a651 commit cc74aa5

File tree

1 file changed

+18
-60
lines changed

1 file changed

+18
-60
lines changed

.github/workflows/python-publish.yml

Lines changed: 18 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,28 @@
1-
# This workflow will upload a Python Package to PyPI when a release is created
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
8-
9-
name: Upload Python Package
1+
name: Publish to PyPI
102

113
on:
124
release:
135
types: [published]
146

15-
permissions:
16-
contents: read
17-
187
jobs:
19-
release-build:
8+
publish:
209
runs-on: ubuntu-latest
21-
22-
steps:
23-
- uses: actions/checkout@v4
24-
25-
- uses: actions/setup-python@v5
26-
with:
27-
python-version: "3.x"
28-
29-
- name: Build release distributions
30-
run: |
31-
# NOTE: put your own distribution build steps here.
32-
python -m pip install build
33-
python -m build
34-
35-
- name: Upload distributions
36-
uses: actions/upload-artifact@v4
37-
with:
38-
name: release-dists
39-
path: dist/
40-
41-
pypi-publish:
42-
runs-on: ubuntu-latest
43-
needs:
44-
- release-build
45-
permissions:
46-
# IMPORTANT: this permission is mandatory for trusted publishing
47-
id-token: write
48-
49-
# Dedicated environments with protections for publishing are strongly recommended.
50-
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
5110
environment:
5211
name: pypi
53-
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
54-
# url: https://pypi.org/p/YOURPROJECT
55-
#
56-
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
57-
# ALTERNATIVE: exactly, uncomment the following line instead:
58-
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
59-
12+
url: https://pypi.org/p/cerebras-agent
13+
permissions:
14+
id-token: write
6015
steps:
61-
- name: Retrieve release distributions
62-
uses: actions/download-artifact@v4
63-
with:
64-
name: release-dists
65-
path: dist/
66-
67-
- name: Publish release distributions to PyPI
68-
uses: pypa/gh-action-pypi-publish@release/v1
69-
with:
70-
packages-dir: dist/
16+
- uses: actions/checkout@v4
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.10'
21+
- name: Install build dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install build twine
25+
- name: Build package
26+
run: python -m build
27+
- name: Publish package
28+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)