From 9c8ddf827a002e66790e4396d90d6704ac60bf6b Mon Sep 17 00:00:00 2001 From: Sitoi <133397418@qq.com> Date: Sun, 7 Jan 2024 21:58:44 +0800 Subject: [PATCH] Create release-publish.yml --- .github/workflows/release-publish.yml | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/release-publish.yml diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml new file mode 100644 index 000000000..62b6e60e3 --- /dev/null +++ b/.github/workflows/release-publish.yml @@ -0,0 +1,38 @@ +# This workflow will upload a Python Package using Twine when a release is published +# For more information see: https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ + +name: Upload Release to PyPi + +on: + release: + types: [published] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - 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: + password: ${{ secrets.PYPI_API_TOKEN }}