Fix to makefile for voice[smart] #7
Workflow file for this run
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: Release Batch SDK | |
| on: | |
| push: | |
| tags: | |
| - "batch/v*" | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| extract-version: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.extract.outputs.version }} | |
| steps: | |
| - name: Extract version from tag | |
| id: extract | |
| run: | | |
| # Extract version from tag (batch/v1.0.0 -> 1.0.0) | |
| VERSION=${GITHUB_REF#refs/tags/batch/v} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Extracted version: $VERSION" | |
| test-batch: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Test Batch SDK | |
| run: | | |
| make install-dev | |
| make lint-batch | |
| make test-batch | |
| release-build: | |
| runs-on: ubuntu-latest | |
| needs: [extract-version, test-batch] | |
| outputs: | |
| version: ${{ needs.extract-version.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: Update package version in sdk/batch/speechmatics/batch/__init__.py | |
| run: | | |
| VERSION="${{ needs.extract-version.outputs.version }}" | |
| sed -i "s/0\.0\.0/$VERSION/g" ./sdk/batch/speechmatics/batch/__init__.py | |
| echo "Updated version to: $VERSION" | |
| cat ./sdk/batch/speechmatics/batch/__init__.py | grep __version__ | |
| - name: Build Batch SDK | |
| run: | | |
| make install-dev | |
| make build-batch | |
| - name: Upload dist | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: batch-release-dist | |
| path: sdk/batch/dist/ | |
| pypi-publish: | |
| runs-on: ubuntu-latest | |
| needs: [release-build] | |
| environment: | |
| name: pypi-batch | |
| url: https://pypi.org/project/speechmatics-batch/${{ needs.release-build.outputs.version }} | |
| steps: | |
| - name: Retrieve release dist | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: batch-release-dist | |
| path: dist/ | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist/ | |
| password: ${{ secrets.PYPI_ORG_TOKEN }} |