From bc1f0701ff419ed608c2bd0149fdbab841404dd1 Mon Sep 17 00:00:00 2001 From: MahmoudHousam Date: Sun, 15 Dec 2024 21:03:53 +0200 Subject: [PATCH] CI/CD release workflow --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 10 ---------- .gitignore | 4 ++++ setup.py | 4 ++-- 4 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9f37f1b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Publish Package to PyPI + +on: + push: + tags: + - "v*" + +jobs: + Deploy: + name: Deploy to PyPI + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: "3.9" + + - name: Install Dependencies + run: | + python -m pip install pip --upgrade pip + pip install build + + - name: Build Package + run: python -m build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 2f946c6..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,10 +0,0 @@ -steps: -- uses: actions/checkout@v4 -- name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' -- name: Test with pytest - run: | - pip install pytest pytest-cov - pytest tests/ diff --git a/.gitignore b/.gitignore index 6cdb6a5..5200468 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,7 @@ demo.mp4 example_options2.py .vscode/ __pycache__/ +build/ +dist/ +*.egg-info/ +build-vizblend \ No newline at end of file diff --git a/setup.py b/setup.py index 9d1729c..509ba10 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,8 @@ from setuptools import setup, find_packages setup( - name="vizblend", # Name of your package - version="1.0.0", # Initial version + name="vizblend", + version="1.0.0", author="Mahmoud Housam", author_email="mahmoudhousam60@gmail.com", description="A Python package to generate HTML reports from Plotly figures using Jinja2 templates.",