👷 使用 Github Action 自动构建 pypi 包

This commit is contained in:
xtaodada 2020-08-11 20:46:02 +08:00
parent 16017c4bd3
commit b4f0078e68
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736
2 changed files with 52 additions and 5 deletions

47
.github/workflows/python.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: Upload Python Package
on:
# 当master分支有push时触发action
push:
branches:
- master
# 当一个pr被合并到master时触发action
pull_request:
branches:
- master
# 当发布时触发action
#release:
# types: [created]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8"]
steps:
# 此步骤使用 GitHub 的 https://github.com/actions/checkout
- uses: actions/checkout@v2
# 设置python环境
# 此步骤使用 GitHub 的 https://github.com/actions/setup-python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# 安装依赖
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
# 构建和发布
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*

View File

@ -8,14 +8,14 @@ with open("requirements.txt", "r") as fp:
install_requires = fp.read()
setup(
name="pagermaid",
version="2020.2.post13",
author="Stykers",
author_email="stykers@stykers.moe",
name="pagermaid_modify",
version="2020.8.post1",
author="xtaodada",
author_email="xtao@xtaolink.cn",
description="A telegram utility daemon and plugin framework.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://katonkeyboard.moe/pagermaid.html",
url="https://github.com/xtaodada/PagerMaid-Modify",
packages=find_packages(),
entry_points={
'console_scripts': [