pmpt/.github/workflows/continuous-integration-workflow.yml

41 lines
1.2 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
# action的名称
name: Upload Python Package
on:
# 当master分支有push时触发action
push:
branches:
- master
jobs:
deploy:
name: publish python package to PYPI
# 此作业在 Linux 上运行
runs-on: ubuntu-latest
steps:
# 此步骤使用 GitHub 的 https://github.com/actions/checkout
- uses: actions/checkout@v2
# 安装依赖
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel twine
make init
# - name: Test Code
# run: |
# ./test.sh
# 构建和发布
- 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/*
twine upload dist/* --repository https://git.moyanjdc.top/api/packages/pubilc/pypi/simple -u pubilc -p pubilc