File tree Expand file tree Collapse file tree 1 file changed +4
-24
lines changed Expand file tree Collapse file tree 1 file changed +4
-24
lines changed Original file line number Diff line number Diff line change 23
23
run : |
24
24
python -m pip install --upgrade pip
25
25
pip install build
26
+ - name : change mitiq version
27
+ run : |
28
+ truncate -s -1 VERSION.txt
29
+ echo "$(date +"%Y%m%d")" >> VERSION.txt
26
30
- name : Build mitiq
27
31
run : python -m build
28
32
- name : Store build artifacts
50
54
uses : pypa/gh-action-pypi-publish@release/v1
51
55
with :
52
56
repository-url : https://test.pypi.org/legacy/
53
-
54
- verify-version :
55
- needs : test-publish
56
- runs-on : ubuntu-latest
57
- environment : testpypi
58
- steps :
59
- - name : Set up Python
60
- uses : actions/setup-python@v5
61
- with :
62
- python-version : " 3.11"
63
- - name : Install package from TestPyPI
64
- run : pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.python.org/simple/ mitiq
65
- - name : Set version variable
66
- run : |
67
- VER=$(cat VERSION.txt)
68
- echo "VERSION=$VER" >> $GITHUB_ENV
69
-
70
- - name : Verify the published version
71
- run : |
72
- TEST_IMPORT_VERSION=$(python -c "import mitiq; print(mitiq.__version__)")
73
- if [ "$TEST_IMPORT_VERSION" != "$VERSION" ]; then
74
- echo "Imported version $TEST_IMPORT_VERSION does not match tag $VERSION"
75
- exit 1
76
- fi
You can’t perform that action at this time.
0 commit comments