diff --git a/.github/workflow/pypi-publish.yml b/.github/workflow/pypi-publish.yml new file mode 100644 index 0000000..326ac7d --- /dev/null +++ b/.github/workflow/pypi-publish.yml @@ -0,0 +1,26 @@ +name: pypi-publish +on: + # https://docs.github.com/cn/actions/using-workflows/events-that-trigger-workflows#release + release: + types: [published] +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + - name: set up Python3.9 + uses: actions/setup-python@v1 + with: + python-version: 3.9 + - name: install pypa/build + run: >- + python -m pip install build --user + - name: build + run: >- + python -m build --sdist --wheel --outdir dist/ . + - name: publish + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file