Skip to content

Commit b8f5d8e

Browse files
committed
fix: use publish job to publish
1 parent 87b2a2c commit b8f5d8e

File tree

2 files changed

+9
-45
lines changed

2 files changed

+9
-45
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,22 @@ jobs:
2323
poetry install --all-extras
2424
2525
- name: Check package version matches tag
26+
if: github.event_name == 'push'
2627
run: |
2728
TAG_VERSION=${GITHUB_REF#refs/tags/v}
2829
PACKAGE_VERSION=$(poetry version -s)
2930
if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
3031
echo "Error: Tag version ($TAG_VERSION) does not match package version ($PACKAGE_VERSION)"
3132
exit 1
3233
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
3342
3443
- name: Build Python package
3544
run: poetry build

.github/workflows/publish_alpha.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)