diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3482ae7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Release +on: + release: + types: [published] + +jobs: + release: + name: Release to PyPI + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: setup python + uses: actions/setup-python@v6 + with: + python-version: 3.9 + - name: Install build dependencies + run: pip install build + - name: Build package + run: python -m build + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_UPLOAD_TOKEN }} + diff --git a/pyproject.toml b/pyproject.toml index 8aa4114..b34b911 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,3 +51,11 @@ notifications = "tutorplatformnotifications.plugin" [tool.setuptools.dynamic] version = {attr = "tutorplatformnotifications.__about__.__version__"} + +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[tool.setuptools.packages.find] +where = ["."] +include = ["tutorplatformnotifications*"]