File tree Expand file tree Collapse file tree 2 files changed +9
-45
lines changed Expand file tree Collapse file tree 2 files changed +9
-45
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,22 @@ jobs:
23
23
poetry install --all-extras
24
24
25
25
- name : Check package version matches tag
26
+ if : github.event_name == 'push'
26
27
run : |
27
28
TAG_VERSION=${GITHUB_REF#refs/tags/v}
28
29
PACKAGE_VERSION=$(poetry version -s)
29
30
if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
30
31
echo "Error: Tag version ($TAG_VERSION) does not match package version ($PACKAGE_VERSION)"
31
32
exit 1
32
33
fi
34
+ - name : Check that version is alpha version
35
+ if : github.event_name != 'push'
36
+ run : |
37
+ PACKAGE_VERSION=$(poetry version -s)
38
+ if [[ ! "$PACKAGE_VERSION" =~ .*a[0-9]+$ ]]; then
39
+ echo "Error: Package version ($PACKAGE_VERSION) is not an alpha version (should end with 'aN' where N is a number)"
40
+ exit 1
41
+ fi
33
42
34
43
- name : Build Python package
35
44
run : poetry build
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments