Skip to content

Commit c87f7bd

Browse files
committed
加入工作流来构建
1 parent 7620f69 commit c87f7bd

File tree

4 files changed

+69
-27
lines changed

4 files changed

+69
-27
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main # 假设您的主分支是 main
7+
8+
jobs:
9+
build-and-release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: 检查代码
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: '3.x'
20+
21+
- name: Install dependencies
22+
run: |
23+
apt-get update
24+
apt-get install -y python-full
25+
python -m pip install --upgrade pip
26+
pip install setuptools wheel pillow
27+
28+
- name: Build wheel package
29+
run: |
30+
python setup.py bdist_wheel
31+
32+
- name: Upload Artifacts
33+
uses: actions/upload-artifact@v2
34+
with:
35+
name: mctoast-snapshot
36+
path: dist/*.whl

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist
2+
build
3+
*.egg-info

pyproject.toml

Lines changed: 0 additions & 27 deletions
This file was deleted.

setup.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import setuptools
2+
print("MCToast Setup.py By SystemFileB")
3+
print()
4+
with open("README.md", "r", encoding="utf-8") as f:
5+
long_description = f.read()
6+
f.close()
7+
8+
setuptools.setup(
9+
name="mctoast",
10+
version="1.0",
11+
description="把Minecraft的Toast带到现实里!",
12+
long_description=long_description,
13+
long_description_content_type="text/markdown",
14+
author="SystemFileB",
15+
packages=setuptools.find_packages(where=".",include=['*']),
16+
package_data={
17+
'mctoast': ['*'], # 包含mctoast目录下的所有文件
18+
},
19+
classifiers=[
20+
"Programming Language :: Python :: 3",
21+
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
22+
"Operating System :: OS Independent",
23+
],
24+
requires=["pillow"],
25+
license="GNU Lesser General Public License v3 (LGPLv3)",
26+
fullname="Minecraft Toast (tkinter)",
27+
url="https://github.com/SystemFileB/mctoast",
28+
include_package_data=True
29+
30+
)

0 commit comments

Comments
 (0)