2. Build and Publish Python #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 2. Build and Publish Python | |
| on: | |
| workflow_run: | |
| workflows: ["1. Bump Version"] | |
| types: | |
| - completed | |
| branches: | |
| - main | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| env: | |
| _VERSION: 7.3.0-250215 | |
| jobs: | |
| build_publish: | |
| name: Build and Publish Python Package | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| actions: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Get latest version | |
| run: | | |
| git pull origin main | |
| echo "Current version: v$(./scripts/get-version.sh -p)" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install -U pip | |
| python -m pip install -r ./requirements/requirements.build.txt | |
| - name: Build the package | |
| run: | | |
| ./scripts/build.sh -c | |
| - name: Create release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: ./scripts/release.sh |