feat: OpenFeature provider for Python (#2) #4
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: Publish | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.14' | |
| cache: pip | |
| - name: Install development dependencies | |
| run: python -m pip install -e '.[dev]' | |
| - name: Verify tag matches package version | |
| run: test "${GITHUB_REF_NAME#v}" = "$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')" | |
| - name: Run checks | |
| run: make check | |
| - name: Build and validate package | |
| run: | | |
| python -m build | |
| python -m twine check dist/* | |
| - name: Verify built OpenFeature package | |
| run: | | |
| python -m venv /tmp/featurevisor-release | |
| WHEEL=$(find dist -name 'featurevisor-*.whl' -print -quit) | |
| /tmp/featurevisor-release/bin/python -m pip install "${WHEEL}[openfeature]" | |
| /tmp/featurevisor-release/bin/python -m unittest discover -s tests_openfeature -v | |
| /tmp/featurevisor-release/bin/python -m pip check | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |