添加自动发布到pypi的github action

This commit is contained in:
xaoyo 2023-10-31 18:43:16 +08:00
parent 3f8bf5d975
commit a4b552f1b4

View File

@ -3,6 +3,8 @@ name: Publish
on:
# 当master分支有push时触发action
push:
branches:
- master
tags:
- 'v*' # 以 'v' 开头的标签触发工作流程
@ -17,7 +19,7 @@ jobs:
- name: Checkout repository # 检出仓库
uses: actions/checkout@v2 # 使用 GitHub 官方的 checkout action
- run: |
git fetch --prune --unshallow
git fetch --prune --unshallow
- name: Set up Python # 设置 Python 环境
uses: actions/setup-python@v2 # 使用 GitHub 官方的 setup-python action
@ -28,9 +30,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install build
- name: Install Twine
run: python -m pip install --upgrade twine
python -m pip install --upgrade twine
- name: Build package
run: python -m build
@ -51,7 +51,7 @@ jobs:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Update PyWxDump
[Auto Release] Update PyWxDump
draft: false
prerelease: false