forked from dptech-corp/dflow
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 1.52 KB
/
ci-pypi.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Publish Python distributions to PyPI
on:
push:
branches:
- master
paths:
- 'VERSION'
jobs:
build-n-publish:
if: github.repository_owner == 'deepmodeling'
name: Build and publish Python distributions to PyPI
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@master
with:
python-version: 3.9
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
- name: read version
id: read
uses: juliangruber/read-file-action@v1
with:
path: ./VERSION
- name: send email
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.feishu.cn
server_port: 465
username: ${{ secrets.MAILUSERNAME }}
password: ${{ secrets.MAILPASSWORD }}
subject: PyPI Auto Build For Dflow
body: Distribution has been published to https://pypi.org/project/pydflow/${{ steps.read.outputs.content }}/
to: ${{ secrets.MAIL_RECEIVER_LIST }}
from: Github Actions
content_type: text