Skip to content

Commit 25fb25c

Browse files
authored
Update publish.yml
1 parent 89c9435 commit 25fb25c

1 file changed

Lines changed: 11 additions & 18 deletions

File tree

.github/workflows/publish.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,29 @@ name: Publish to PyPI
33
on:
44
release:
55
types: [published]
6-
workflow_dispatch: # Allow manual run from Actions tab
6+
7+
permissions:
8+
id-token: write # Required for trusted publishing
9+
contents: read
710

811
jobs:
9-
build-and-publish:
10-
name: Build and Publish to PyPI
12+
build-n-publish:
1113
runs-on: ubuntu-latest
12-
1314
steps:
14-
- name: Checkout source
15-
uses: actions/checkout@v3
15+
- uses: actions/checkout@v3
1616

17-
- name: Set up Python 3.10
17+
- name: Set up Python
1818
uses: actions/setup-python@v4
1919
with:
2020
python-version: '3.10'
2121

22-
- name: Upgrade pip and install build tools
22+
- name: Install build tools
2323
run: |
2424
python -m pip install --upgrade pip
25-
pip install build twine
25+
pip install build
2626
27-
- name: Build the distribution
27+
- name: Build package
2828
run: python -m build
2929

30-
- name: Verify distribution files
31-
run: |
32-
echo "Listing dist/ contents:"
33-
ls -l dist/
34-
35-
- name: Publish to PyPI
30+
- name: Publish to PyPI using Trusted Publisher
3631
uses: pypa/gh-action-pypi-publish@release/v1
37-
with:
38-
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)