diff --git a/.github/workflows/pypi-publish.yaml b/.github/workflows/pypi-publish.yaml new file mode 100644 index 0000000..f879462 --- /dev/null +++ b/.github/workflows/pypi-publish.yaml @@ -0,0 +1,35 @@ +name: Publish package to PyPi + +on: + release: + types: [published] + +jobs: + + push: + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/harmony-plugin') + defaults: + run: + working-directory: ./tutor-contrib-harmony-plugin + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: setup python + uses: actions/setup-python@v5 + with: + python-version: 3.12 + + - 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 }} + packages-dir: tutor-contrib-harmony-plugin/dist diff --git a/tutor-contrib-harmony-plugin/setup.py b/tutor-contrib-harmony-plugin/setup.py index d09042f..eaf0162 100644 --- a/tutor-contrib-harmony-plugin/setup.py +++ b/tutor-contrib-harmony-plugin/setup.py @@ -26,7 +26,7 @@ def load_about(): setup( - name="tutor-contrib-harmony-plugin", + name="tutor-contrib-harmony", version=ABOUT["__version__"], url="https://github.com/openedx/openedx-k8s-harmony", project_urls={