Skip to content

Commit ebbac30

Browse files
committed
pump replayer python version
1 parent 54c2af9 commit ebbac30

File tree

2 files changed

+49
-25
lines changed

2 files changed

+49
-25
lines changed

.github/workflows/publish-python-package.yml

Lines changed: 48 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,17 @@ jobs:
5151
TWINE_USERNAME: __token__
5252
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
5353

54-
# Publish to GitHub Packages
55-
- name: Publish to GitHub Packages
54+
# Prepare package for GitHub Release
55+
- name: Prepare package for GitHub Release
5656
if: startsWith(github.ref, 'refs/tags/replayer-adapter-python-v')
5757
run: |
5858
cd replayer-adapter-python
59-
python -m twine upload --repository github dist/*
60-
env:
61-
TWINE_USERNAME: __token__
62-
TWINE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
59+
# Create a source distribution if not already created
60+
if [ ! -d "dist" ]; then
61+
python -m build
62+
fi
63+
# List the built packages
64+
ls -la dist/
6365
6466
# Manual publish to PyPI
6567
- name: Manual publish to PyPI
@@ -76,8 +78,8 @@ jobs:
7678
TWINE_USERNAME: __token__
7779
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
7880

79-
# Manual publish to GitHub Packages
80-
- name: Manual publish to GitHub Packages
81+
# Manual prepare package for GitHub Release
82+
- name: Manual prepare package for GitHub Release
8183
if: github.event_name == 'workflow_dispatch'
8284
run: |
8385
cd replayer-adapter-python
@@ -86,13 +88,11 @@ jobs:
8688
sed -i 's/version = ".*"/version = "${{ github.event.inputs.version }}"/' pyproject.toml
8789
fi
8890
python -m build
89-
python -m twine upload --repository github dist/*
90-
env:
91-
TWINE_USERNAME: __token__
92-
TWINE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
91+
ls -la dist/
9392
9493
- name: Create GitHub Release
9594
if: startsWith(github.ref, 'refs/tags/replayer-adapter-python-v')
95+
id: create_release
9696
uses: actions/create-release@v1
9797
env:
9898
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -108,8 +108,40 @@ jobs:
108108
109109
- Version: ${{ github.ref_name }}
110110
- Built from commit: ${{ github.sha }}
111-
- Available on:
112-
- PyPI: `pip install temporal-replayer-adapter-python`
113-
- GitHub Packages: `pip install temporal-replayer-adapter-python --index-url https://pypi.github.com/phuongdnguyen/temporal-workflow-replay-debugger`
111+
112+
### Installation
113+
114+
#### From PyPI (Recommended)
115+
```bash
116+
pip install temporal-replayer-adapter-python
117+
```
118+
119+
#### From GitHub Release
120+
Download the wheel or source distribution from the release assets below and install:
121+
```bash
122+
pip install temporal_replayer_adapter_python-${{ github.ref_name }}-py3-none-any.whl
123+
# or
124+
pip install temporal-replayer-adapter-python-${{ github.ref_name }}.tar.gz
125+
```
114126
draft: false
115-
prerelease: false
127+
prerelease: false
128+
129+
- name: Upload Python Package Assets to Release
130+
if: startsWith(github.ref, 'refs/tags/replayer-adapter-python-v')
131+
run: |
132+
cd replayer-adapter-python
133+
# Upload all built packages to the release
134+
for file in dist/*; do
135+
if [ -f "$file" ]; then
136+
filename=$(basename "$file")
137+
echo "Uploading $filename to release..."
138+
curl -L \
139+
-X POST \
140+
-H "Accept: application/vnd.github+json" \
141+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
142+
-H "X-GitHub-Api-Version: 2022-11-28" \
143+
-H "Content-Type: application/octet-stream" \
144+
"${{ steps.create_release.outputs.upload_url }}?name=$filename" \
145+
--data-binary "@$file"
146+
fi
147+
done

replayer-adapter-python/pyproject.toml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "temporal-replayer-adapter-python"
7-
version = "1.0.0"
7+
version = "1.0.2"
88
description = "Python Replayer Adapter for Temporal workflows with debugging capabilities"
99
authors = [
1010
{name = "Duy Phuong Nguyen", email = "knowledge.phuongnguyen@gmail.com"}
@@ -36,15 +36,7 @@ Repository = "https://github.com/phuongdnguyen/temporal-workflow-replay-debugger
3636
Issues = "https://github.com/phuongdnguyen/temporal-workflow-replay-debugger/issues"
3737
Documentation = "https://github.com/phuongdnguyen/temporal-workflow-replay-debugger/blob/main/replayer-adapter-python/README.md"
3838

39-
# GitHub Packages configuration
40-
[tool.twine.repository.pypi]
41-
username = "__token__"
42-
password = "${{ secrets.PYPI_TOKEN }}"
4339

44-
[tool.twine.repository.github]
45-
repository = "https://github.com/phuongdnguyen/temporal-workflow-replay-debugger"
46-
username = "__token__"
47-
password = "${{ secrets.GITHUB_TOKEN }}"
4840

4941
[project.optional-dependencies]
5042
dev = [

0 commit comments

Comments
 (0)