File tree 4 files changed +32
-47
lines changed
4 files changed +32
-47
lines changed Original file line number Diff line number Diff line change 1
1
name : Publish to PyPI via Trusted Publisher
2
2
3
3
on :
4
- workflow_run :
5
- workflows : ["Update Version"]
6
- types :
7
- - completed
4
+ push :
5
+ tags :
6
+ - " *"
8
7
9
8
jobs :
10
9
21
20
with :
22
21
fetch-depth : 0
23
22
23
+ - name : Check version
24
+ run : |
25
+ TAG_NAME=$(echo ${{ github.ref_name }})
26
+ PYVERSION_FILE="pyfmm_gui/_version.py"
27
+ PYTHON_VERSION=$(grep -oP '__version__ = "\K[0-9]+\.[0-9]+\.[0-9]+' ${PYVERSION_FILE})
28
+
29
+ if [ "$PYTHON_VERSION" != "${TAG_NAME:1}" ]; then
30
+ echo "Version mismatch between tag and ${PYVERSION_FILE}"
31
+ exit 1
32
+ fi
33
+
34
+
24
35
- name : Set up Python
25
36
uses : actions/setup-python@v4
26
37
with :
Original file line number Diff line number Diff line change 1
1
name : Publish to TestPyPI
2
2
3
3
on :
4
- workflow_run :
5
- workflows : ["Update Version"]
6
- types :
7
- - completed
4
+ push :
5
+ tags :
6
+ - " *"
8
7
9
8
jobs :
10
9
publish :
19
18
with :
20
19
fetch-depth : 0
21
20
21
+ - name : Check version
22
+ run : |
23
+ TAG_NAME=$(echo ${{ github.ref_name }})
24
+ PYVERSION_FILE="pyfmm_gui/_version.py"
25
+ PYTHON_VERSION=$(grep -oP '__version__ = "\K[0-9]+\.[0-9]+\.[0-9]+' ${PYVERSION_FILE})
26
+
27
+ if [ "$PYTHON_VERSION" != "${TAG_NAME:1}" ]; then
28
+ echo "Version mismatch between tag and ${PYVERSION_FILE}"
29
+ exit 1
30
+ fi
31
+
32
+
22
33
- name : Set up Python
23
34
uses : actions/setup-python@v4
24
35
with :
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
/build
3
3
/dist
4
4
/* .egg-info
5
- /pyfmm_gui /__pycache__
5
+ /pyfmm_gui /__pycache__
6
+ /.vscode
You can’t perform that action at this time.
0 commit comments