diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..e05bebe --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,41 @@ +# 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: | + python3 -m pip install --upgrade build + python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ddce99e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,22 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "Pepitoww" +version = "0.0.1" +authors = [ + { name="Pepitoww", email="lucas.bonnemains@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" diff --git a/src/lucas/__init__.py b/src/lucas/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/main.py b/src/lucas/main.py similarity index 95% rename from main.py rename to src/lucas/main.py index 991edee..61f0528 100644 --- a/main.py +++ b/src/lucas/main.py @@ -1,5 +1,5 @@ -def say_hello(): - print("Say Hello !") - -if __name__ == '__main__': +def say_hello(): + print("Say Hello !") + +if __name__ == '__main__': say_hello() \ No newline at end of file