Skip to content

Commit e63723e

Browse files
committed
dist test
1 parent e8a5f60 commit e63723e

File tree

1 file changed

+41
-18
lines changed

1 file changed

+41
-18
lines changed
Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,48 @@
1-
# .github/workflows/publish-to-pypi.yml
2-
on:
3-
push:
4-
branches:
5-
- main
1+
name: Publish Python 🐍 distribution 📦 on to PyPI and TestPyPI
2+
on: push
63
jobs:
7-
pypi-publish:
8-
name: Upload release to PyPI
4+
build:
5+
name: Build distribution 📦
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- uses: actions/checkout@v4
10+
with:
11+
persist-credentials: false
12+
- name: Set up Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.x"
16+
- name: Install pypa/build
17+
run: >-
18+
python 3 -m
19+
pip Install
20+
build
21+
--user
22+
- name: Build a binary wheel and a source tarball
23+
run: python3 -m build
24+
- name: Store the distribution packages
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: python-package-distributions
28+
path: dist/
29+
publish-to-pypi:
30+
name: >-
31+
Publish Python 🐍 distribution 📦 to PyPI
32+
if: startsWith(github.ref, 'refs/tags/')
33+
needs:
34+
- build
935
runs-on: ubuntu-latest
1036
environment:
1137
name: pypi
1238
url: https://pypi.org/p/legitindicators
1339
permissions:
14-
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
40+
id-token: write
1541
steps:
16-
# retrieve your distributions here
17-
- name: Install dependencies
18-
run: |
19-
python -m pip install --upgrade pip
20-
pip install wheel twine
21-
- name: Build distribution
22-
run: |
23-
ls -lart
24-
- name: Publish package distributions to PyPI
25-
uses: pypa/gh-action-pypi-publish@release/v1
42+
- name: Download all dists
43+
uses: actions/download-artifact@v4
44+
with:
45+
name: python-package-distributions
46+
path: dist/
47+
- name: Publish distribution 📦 to PyPI
48+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)