Skip to content

Commit 379bf17

Browse files
crazyscientistcrobinso
authored andcommitted
Publish package on PyPI from CI
1 parent 5eedea3 commit 379bf17

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will publish the package on PyPI
2+
# For more information see: https://github.com/pypa/gh-action-pypi-publish
3+
4+
name: Publish
5+
on:
6+
release:
7+
types: [released]
8+
9+
jobs:
10+
publish:
11+
name: Upload release to PyPI
12+
runs-on: ubuntu-latest
13+
environment:
14+
name: pypi
15+
url: https://pypi.org/p/python-bugzilla
16+
permissions:
17+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.x"
24+
- name: Install pypa/build
25+
run: pip install build
26+
- name: Build a source tarball
27+
run: python -m build --sdist
28+
- name: Publish package distributions to PyPI
29+
uses: pypa/gh-action-pypi-publish@release/v1
30+
with:
31+
skip-existing: false
32+
verbose: false

0 commit comments

Comments
 (0)