Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Build And Release To PyPI | |
on: | |
# 手动触发构建 | |
workflow_dispatch: | |
# (从版本分支)创建 release 的时候触发 (release 版) | |
release: | |
types: [published] | |
# 把特性分支合并到 v* 版本分支时触发 (snapshot 版) | |
# pull_request: | |
# branches: [v*] | |
# 推送特性分支时触发 (snapshot 版) | |
# push: | |
# branches: [feature-*] | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.x' | |
- name: Install build dependencies | |
run: pip install -U setuptools wheel build | |
- name: Build | |
run: python -m build . | |
- name: Publish | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.pypi_password }} | |
skip_existing: true |