From 807084a5a0a6752fad8e0ce974caf9f24ad0cfa4 Mon Sep 17 00:00:00 2001 From: AlexisAnd1 <96106108+AlexisAnd1@users.noreply.github.com> Date: Thu, 29 Sep 2022 20:31:48 +0200 Subject: [PATCH 1/2] Create python-publish.yml --- .github/workflows/python-publish.yml | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..ec70354 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,39 @@ +# 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 build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} From 44216ac81383b8578b645bd813e4a17ee5794c34 Mon Sep 17 00:00:00 2001 From: AlexisAnd1 <96106108+AlexisAnd1@users.noreply.github.com> Date: Thu, 29 Sep 2022 20:39:30 +0200 Subject: [PATCH 2/2] LECOMMIT LECOMMIT --- .github/workflows/python-publish.yml | 4 +++- pyproject.toml | 22 ++++++++++++++++++++++ src/Erydex/__init__.py | 0 main.py => src/Erydex/main.py | 8 ++++---- 4 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 pyproject.toml create mode 100644 src/Erydex/__init__.py rename main.py => src/Erydex/main.py (95%) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index ec70354..7c16afb 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -31,7 +31,9 @@ jobs: python -m pip install --upgrade pip pip install build - name: Build package - run: python -m build + run: | + python3 -m pip install --upgrade build + python -m build - name: Publish package uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 with: diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..883afe3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,22 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "Erydex" +version = "0.0.1" +authors = [ + { name="Erydex", email="alexisandreu@hotmail.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/Erydex/__init__.py b/src/Erydex/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/main.py b/src/Erydex/main.py similarity index 95% rename from main.py rename to src/Erydex/main.py index 991edee..61f0528 100644 --- a/main.py +++ b/src/Erydex/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