Repository navigation
53 lines (41 loc) · 1.47 KB
/
Copy pathpublish.yml
File metadata and controls
53 lines (41 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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@v7
- 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 v4 conformance is in the source distribution
run: tar -tzf dist/featurevisor-*.tar.gz | grep '/conformance/sdk-v4-cases.json$'
- 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