Skip to content

Commit e2d3019

Browse files
authored
ci: add alpha release pipeline (#243)
1 parent 3072c0e commit e2d3019

File tree

2 files changed

+36
-4
lines changed

2 files changed

+36
-4
lines changed

.github/workflows/cd.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- alpha
78
paths-ignore:
89
- "docs/**"
910
- ".github/**"
@@ -68,6 +69,22 @@ jobs:
6869
- name: Set Git user as GitHub actions
6970
run: git config --global user.email "179917785+engineering-ci[bot]@users.noreply.github.com" && git config --global user.name "engineering-ci[bot]"
7071

72+
- name: Create Continuous Deployment - Alpha
73+
if: steps.get_branch.outputs.branch == 'alpha'
74+
run: |
75+
uv run semantic-release \
76+
-v DEBUG \
77+
--prerelease \
78+
--define=prerelease_tag=alpha \
79+
--define=branch=alpha \
80+
--define=upload_to_repository=true \
81+
publish
82+
gh release edit --prerelease "v$(uv run semantic-release print-version --current)"
83+
env:
84+
GH_TOKEN: ${{ steps.app_token.outputs.token }}
85+
REPOSITORY_USERNAME: __token__
86+
REPOSITORY_PASSWORD: ${{ secrets.PYPI_API_KEY }}
87+
7188
- name: Create Continuous Deployment - Beta (non-prod)
7289
if: steps.get_branch.outputs.branch == 'main' && !inputs.production_release
7390
run: |

pyproject.toml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,21 @@ sequence = [
260260
"generate-kmd-client",
261261
]
262262

263+
[tool.poe.tasks.release-preview]
264+
sequence = [
265+
{ cmd = "semantic-release print-version --current" },
266+
{ cmd = "semantic-release print-version --prerelease" },
267+
]
268+
help = "Preview current and next prerelease version"
269+
270+
[tool.poe.tasks.release-dry-run-alpha]
271+
shell = "semantic-release -v DEBUG --noop --prerelease --define=prerelease_tag=alpha publish"
272+
help = "Dry-run alpha release (no changes made)"
273+
274+
[tool.poe.tasks.release-dry-run-beta]
275+
shell = "semantic-release -v DEBUG --noop --prerelease --define=prerelease_tag=beta publish"
276+
help = "Dry-run beta release (no changes made)"
277+
263278
[tool.pytest.ini_options]
264279
pythonpath = ["src"]
265280
testpaths = ["tests"]
@@ -308,6 +323,10 @@ disallow_untyped_calls = false
308323
module = ["tests.transactions.test_transaction_composer"]
309324
disable_error_code = ["call-overload", "union-attr"]
310325

326+
[[tool.mypy.overrides]]
327+
module = ["msgpack", "msgpack.*"]
328+
ignore_missing_imports = true
329+
311330
[tool.semantic_release]
312331
version_toml = "pyproject.toml:project.version"
313332
remove_dist = false
@@ -318,7 +337,3 @@ upload_to_repository = false
318337
tag_commit = true
319338
branch = "main"
320339
commit_message = "{version}\n\nskip-checks: true"
321-
322-
[[tool.mypy.overrides]]
323-
module = ["msgpack", "msgpack.*"]
324-
ignore_missing_imports = true

0 commit comments

Comments
 (0)