diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index d30bc65..9767ea9 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -39,3 +39,4 @@ jobs: run: | pytest + diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..a9dcab0 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,44 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: | + python -m pip install --upgrade pip + python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.gaelle }} + + + diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..63a5749 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,22 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "gaelle.monteil-combabessou" +version = "0.0.1" +authors = [ + { name="gaelle.monteil-combabessou", email="gaelle.monteil-combabessou@isen.yncrea.fr" }, +] +description = "A small example package" +readme = "README.md" +requires-python = ">=3.7" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] + +[project.urls] +"Homepage" = "https://github.com/pypa/sampleproject" +"Bug Tracker" = "https://github.com/pypa/sampleproject/issues" \ No newline at end of file diff --git a/src/example_package_gaelle.monteil-combabessou/__init__.py b/src/example_package_gaelle.monteil-combabessou/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/main.py b/src/example_package_gaelle.monteil-combabessou/main.py similarity index 100% rename from main.py rename to src/example_package_gaelle.monteil-combabessou/main.py diff --git a/test_main.py b/tests/test_main.py similarity index 100% rename from test_main.py rename to tests/test_main.py