From 75f1454b947edcf76c55ed203388b5823f0f02c1 Mon Sep 17 00:00:00 2001
From: Mayuresh Mudrale <mayureshmudrale@gmail.com>
Date: Mon, 13 Jan 2025 13:19:10 +0530
Subject: [PATCH] ghactions pypi release

---
 .github/workflows/pypi_publish.yaml | 35 +++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 .github/workflows/pypi_publish.yaml

diff --git a/.github/workflows/pypi_publish.yaml b/.github/workflows/pypi_publish.yaml
new file mode 100644
index 0000000..2b8c8c1
--- /dev/null
+++ b/.github/workflows/pypi_publish.yaml
@@ -0,0 +1,35 @@
+name: Publish Python Package to PyPI
+
+on:
+  release:
+    types: [created]
+
+jobs:
+  deploy:
+    runs-on: ubuntu-latest
+    environment:
+      name: pypi
+      url: https://pypi.org/project/aklogger/
+    permissions:
+      id-token: write
+    steps:
+    - uses: actions/checkout@v4
+    - name: Set up Python
+      uses: actions/setup-python@v5
+      with:
+        python-version: '3.8'
+        cache: pip
+    - name: Install Protoc
+      run: |
+        PROTOC_ZIP=protoc-3.13.0-linux-x86_64.zip && \
+        curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.13.0/$PROTOC_ZIP && \
+        unzip -q $PROTOC_ZIP bin/protoc -d /usr/local && 
+        protoc --version
+    - name: Install dependencies
+      run: |
+        pip install setuptools wheel build
+    - name: Build
+      run: |
+        python setup.py build && python -m build
+    - name: Publish
+      uses: pypa/gh-action-pypi-publish@release/v1
\ No newline at end of file