Skip to content

Commit 7cd49ea

Browse files
author
Aleksander Błaszkiewicz
committed
fix: make check step run after publish step
1 parent 8efe144 commit 7cd49ea

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.github/workflows/check-deployed-package.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@ name: Check deployed package
22

33
on:
44
workflow_dispatch:
5-
push:
5+
workflow_run:
6+
workflows: ['Publish Package to PyPI']
7+
types:
8+
- completed
69
branches:
710
- main
811

912
jobs:
1013
run-demo:
1114
name: Run LogDash Demo
1215
runs-on: ubuntu-latest
16+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1317

1418
steps:
1519
- name: Checkout repository

.github/workflows/publish-package.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ jobs:
2424
run: python -m build
2525

2626
- name: Publish package
27+
id: publish
2728
uses: pypa/gh-action-pypi-publish@release/v1
2829
with:
2930
password: ${{ secrets.PYPI_API_TOKEN }}
31+
32+
- name: Check deployed package
33+
run: |
34+
# Wait a moment for PyPI to process the upload
35+
sleep 30
36+
PACKAGE_NAME=$(grep -oP "name\s*=\s*['\"](\K[^'\"]+)" setup.py || echo "logdash")
37+
VERSION=$(grep -oP "__version__\s*=\s*['\"](\K[^'\"]+)" logdash/__init__.py)
38+
echo "Checking if $PACKAGE_NAME==$VERSION is available on PyPI..."
39+
pip install $PACKAGE_NAME==$VERSION

logdash/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
from logdash.metrics import MetricOperation
44

55
__all__ = ["create_logdash", "Logger", "MetricOperation"]
6-
__version__ = "1.0.1"
6+
__version__ = "1.0.2"

0 commit comments

Comments
 (0)