Skip to content

Merge pull request #856 from deepmodeling/release-please--branches--m… #400

Merge pull request #856 from deepmodeling/release-please--branches--m…

Merge pull request #856 from deepmodeling/release-please--branches--m… #400

Workflow file for this run

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