Skip to content

Commit d2743f4

Browse files
committed
test workflow
1 parent 9185519 commit d2743f4

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

.github/workflows/publish_pypi.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to PyPI via Trusted Publisher
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
id-token: write
14+
contents: read
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v3
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: "3.9"
24+
25+
- name: Install dependencies
26+
run: |
27+
pip install --upgrade setuptools wheel build
28+
29+
- name: Build the package
30+
run: |
31+
python setup.py sdist bdist_wheel
32+
33+
- name: Pypi Publish
34+
uses: pypa/gh-action-pypi-publish@release/v1
35+
with:
36+
repository_name: pyfmm-kit # 目标 PyPI 项目名称

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/build
2+
/dist
23
/.vscode
34
/*.egg-info
45
/docs/build

setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,18 @@ def read_version():
3838
exec(f.read())
3939
return locals()['__version__']
4040

41+
def read_readme():
42+
with open("README.md", encoding="utf-8") as f:
43+
return f.read()
44+
4145
setup(
4246
name='pyfmm',
4347
version=read_version(),
4448
description='A C/Python package for solving eikonal equation using Fast Marching Method',
4549
author='Zhu Dengda',
4650
author_email='[email protected]',
51+
long_description=read_readme(),
52+
long_description_content_type="text/markdown",
4753
packages=find_packages(),
4854
package_data={'pyfmm': ['./C_extension/lib/libfmm_float.so', './C_extension/lib/libfmm_double.so']},
4955
include_package_data=True,

0 commit comments

Comments
 (0)