zrguo
commited on
Create pypi-publish.yml
Browse files
.github/workflows/pypi-publish.yml
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Upload LightRAG-hku Package
|
2 |
+
|
3 |
+
on:
|
4 |
+
release:
|
5 |
+
types: [published]
|
6 |
+
|
7 |
+
permissions:
|
8 |
+
contents: read
|
9 |
+
|
10 |
+
jobs:
|
11 |
+
release-build:
|
12 |
+
runs-on: ubuntu-latest
|
13 |
+
|
14 |
+
steps:
|
15 |
+
- uses: actions/checkout@v4
|
16 |
+
|
17 |
+
- uses: actions/setup-python@v5
|
18 |
+
with:
|
19 |
+
python-version: "3.x"
|
20 |
+
|
21 |
+
- name: Build release distributions
|
22 |
+
run: |
|
23 |
+
python -m pip install build
|
24 |
+
python -m build
|
25 |
+
|
26 |
+
- name: Upload distributions
|
27 |
+
uses: actions/upload-artifact@v4
|
28 |
+
with:
|
29 |
+
name: release-dists
|
30 |
+
path: dist/
|
31 |
+
|
32 |
+
pypi-publish:
|
33 |
+
runs-on: ubuntu-latest
|
34 |
+
needs:
|
35 |
+
- release-build
|
36 |
+
permissions:
|
37 |
+
id-token: write
|
38 |
+
|
39 |
+
environment:
|
40 |
+
name: pypi
|
41 |
+
|
42 |
+
steps:
|
43 |
+
- name: Retrieve release distributions
|
44 |
+
uses: actions/download-artifact@v4
|
45 |
+
with:
|
46 |
+
name: release-dists
|
47 |
+
path: dist/
|
48 |
+
|
49 |
+
- name: Publish release distributions to PyPI
|
50 |
+
uses: pypa/gh-action-pypi-publish@release/v1
|
51 |
+
with:
|
52 |
+
packages-dir: dist/
|