From 90108b22c2221d21688ad856dca10b908c143cab Mon Sep 17 00:00:00 2001 From: ARYAN-NIKNEZHAD Date: Mon, 9 Sep 2024 02:51:17 +0430 Subject: [PATCH] :wrench::green_heart: chore: Add Release yml file for CI Action - Manage publish package with tag and release dynamic Closes(#55) --- .github/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5bbb84c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: Release + +on: + push: + tags: + - 'v*.*.*' + +jobs: + release: + name: Build and Release + runs-on: ubuntu-latest + + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install poetry + + - name: Build package + run: | + poetry build + + - name: Publish to PyPI + run: | + poetry publish --username __token__ --password ${{ secrets.PYPI_TOKEN }} + env: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}