Skip to content

Commit 33c9b38

Browse files
authored
Include building distribution before upload to pypi
1 parent 881dbc9 commit 33c9b38

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/python-publish.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,23 @@ jobs:
1111
pypi-publish:
1212
name: upload release to PyPI
1313
runs-on: ubuntu-latest
14+
environment:
15+
name: pypi
16+
url: https://pypi.org/p/hsmodels
1417
# Specifying a GitHub environment is optional, but strongly encouraged
1518
# environment: release
1619
permissions:
1720
# IMPORTANT: this permission is mandatory for trusted publishing
1821
id-token: write
1922
steps:
20-
# retrieve your distributions here
21-
- name: Publish package distributions to PyPI
22-
uses: pypa/gh-action-pypi-publish@release/v1
23+
- uses: actions/checkout@v2
24+
- name: Set up Python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: '3.x'
28+
- name: Build Distribution
29+
run: |
30+
python -m pip install --upgrade build
31+
python -m build
32+
- name: Publish package distributions to PyPI
33+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)