diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..7e34b99 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,19 @@ +name: Build python package +run-name: building python package AirwatchAPI +on: [push] + +jobs: + Build: + runs-on: windows + steps: + - name: Check out repository code + uses: actions/checkout@main + - name: Building the package + run: | + mv ${{ gitea.workspace }}\AirwatchAPI.py ${{ gitea.workspace }}\build\src\AirwatchAPI\ + cd ${{ gitea.workspace }}\build + python -m build + - name: Publish package + run: | + python -m twine upload -u ${{ secrets.repo_user }} -p ${{ secrets.repo_pass }} --repository-url ${{ secrets.repo_url }} ${{ gitea.workspace }}\build\dist\* + if: github.ref_type == 'tag' \ No newline at end of file diff --git a/build/pyproject.toml b/build/pyproject.toml new file mode 100644 index 0000000..4c4cbee --- /dev/null +++ b/build/pyproject.toml @@ -0,0 +1,16 @@ +[build-system] +requires = [ + "setuptools >= 77.0.3", + "requests >= 2.32.5" +] +build-backend = "setuptools.build_meta" + +[project] +name = "AirwatchAPI" +version = "1.0.0" +description = "A module python to make it easier to use Workspace One API" +readme = "README.md" +requires-python = ">=3.7" +classifiers = [ + "Programming Language :: Python :: 3" +] diff --git a/build/src/__init__.py b/build/src/__init__.py new file mode 100644 index 0000000..e69de29