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

39 lines
1.1 KiB
YAML
Raw Normal View History

2024-03-29 22:15:57 +08:00
# 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 gotwo
on:
# 当master分支有push时触发action
push:
pull_request:
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
python -m pip install -r requirements.txt
2024-03-30 10:26:31 +08:00
echo $GITHUB_RUN_ID
2024-03-29 22:15:57 +08:00
# - 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/*