From 1ee3ab495c9b8ceaaf6985aa13f2d27669c23c76 Mon Sep 17 00:00:00 2001 From: scivision Date: Tue, 14 Nov 2023 23:41:38 -0500 Subject: [PATCH] auto release pypi --- .github/workflows/publish-python-package.yml | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/publish-python-package.yml diff --git a/.github/workflows/publish-python-package.yml b/.github/workflows/publish-python-package.yml new file mode 100644 index 0000000..04e4f7f --- /dev/null +++ b/.github/workflows/publish-python-package.yml @@ -0,0 +1,32 @@ +name: publish + +on: + release: + types: [published] + +jobs: + release: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Update pip + run: pip install -U pip + + - name: Install builder + run: pip install build + + - name: Build package + run: pyproject-build --outdir dist/ . + + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}