Skip to content

Commit 08fbb63

Browse files
pypi build
1 parent c350356 commit 08fbb63

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,30 @@
1-
# .github/workflows/ci-cd.yml
1+
name: Upload Python Package to PyPI when a Release is Created
2+
3+
on:
4+
release:
5+
types: [created]
6+
27
jobs:
38
pypi-publish:
4-
name: Upload release to PyPI
9+
name: Publish release to PyPI
510
runs-on: ubuntu-latest
611
environment:
712
name: pypi
813
url: https://pypi.org/p/testingbotclient
914
permissions:
10-
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
15+
id-token: write
1116
steps:
12-
# retrieve your distributions here
13-
14-
- name: Publish package distributions to PyPI
15-
uses: pypa/gh-action-pypi-publish@release/v1
17+
- uses: actions/checkout@v4
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.x"
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install setuptools wheel
26+
- name: Build package
27+
run: |
28+
python setup.py sdist bdist_wheel # Could also be python -m build
29+
- name: Publish package distributions to PyPI
30+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)