From 099bdc16ba9f82bf510098f13d69aa7a664c399e Mon Sep 17 00:00:00 2001 From: Cristhian Garcia Date: Mon, 25 Nov 2024 08:54:05 -0500 Subject: [PATCH] chore: add release workflow --- .github/workflows/pypi-publish.yaml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/pypi-publish.yaml diff --git a/.github/workflows/pypi-publish.yaml b/.github/workflows/pypi-publish.yaml new file mode 100644 index 0000000..a46bf35 --- /dev/null +++ b/.github/workflows/pypi-publish.yaml @@ -0,0 +1,34 @@ +name: Publish package to PyPi + +on: + release: + types: [published] + +jobs: + + push: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./tutor-contrib-harmony-plugin + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: setup python + uses: actions/setup-python@v2 + with: + python-version: 3.12 + - name: Debug + run: echo $GITHUB_REF + - name: Install Dependencies + run: pip install setuptools wheel + + - name: Build package + run: python setup.py sdist bdist_wheel + + - name: Publish to PyPi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_UPLOAD_TOKEN }}