From ca0e193ebc2415e7d333df9122739cff100c8cd7 Mon Sep 17 00:00:00 2001 From: Cristhian Garcia Date: Mon, 25 Nov 2024 08:33:52 -0500 Subject: [PATCH 1/2] chore: add release workflow --- .github/workflows/pypi-publish.yaml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 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..3addc4e --- /dev/null +++ b/.github/workflows/pypi-publish.yaml @@ -0,0 +1,33 @@ +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: 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 }} From c2603ad5460cc0ca9c71922bea00f4a2df2755c5 Mon Sep 17 00:00:00 2001 From: Cristhian Garcia Date: Mon, 25 Nov 2024 08:40:32 -0500 Subject: [PATCH 2/2] chore: add release workflow --- .github/workflows/pypi-publish.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pypi-publish.yaml b/.github/workflows/pypi-publish.yaml index 3addc4e..063c826 100644 --- a/.github/workflows/pypi-publish.yaml +++ b/.github/workflows/pypi-publish.yaml @@ -8,6 +8,7 @@ jobs: push: runs-on: ubuntu-latest + if: !startsWith(github.head_ref, 'harmony-chart') defaults: run: working-directory: ./tutor-contrib-harmony-plugin