name: Upload Python Packages

on:
  push:
    tags: ['v*']

jobs:
  deploy:
    runs-on: ubuntu-latest
    permissions:
      id-token: write
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

      - name: Set up Python
        uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # 5.4.0
        with:
          python-version: '3.10'

      - name: Install dependencies
        run: python -m pip install --upgrade pip && pip install build

      - name: Build nixtla package
        run: python -m build

      - name: Publish nixtla package
        uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4

