From b4f0078e689286ac5e8999ad5c323acabb944fb8 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Tue, 11 Aug 2020 20:46:02 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20=E4=BD=BF=E7=94=A8=20Github=20Ac?= =?UTF-8?q?tion=20=E8=87=AA=E5=8A=A8=E6=9E=84=E5=BB=BA=20pypi=20=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/python.yml | 47 ++++++++++++++++++++++++++++++++++++ setup.py | 10 ++++---- 2 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/python.yml diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..ecbe9b4 --- /dev/null +++ b/.github/workflows/python.yml @@ -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/* \ No newline at end of file diff --git a/setup.py b/setup.py index 663a998..ec47baf 100644 --- a/setup.py +++ b/setup.py @@ -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': [