forked from TeamPGM/PagerMaid-Modify
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.14 KB
/
python.yml
File metadata and controls
48 lines (41 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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"]
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/*