Skip to content

Commit 1051397

Browse files
ryan-williamsclaude
andcommitted
Combine CI workflows: manual trigger → Test PyPI, tags → PyPI
Modified the single CI workflow to intelligently choose publication target: - workflow_dispatch (manual trigger) → publishes to Test PyPI - v* tags → publishes to production PyPI - Always runs full test suite first This consolidates the two workflows into one, reducing duplication while providing flexibility for testing releases before production. Removed separate publish-test-pypi.yml workflow. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b6b274f commit 1051397

2 files changed

Lines changed: 11 additions & 58 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ name: CI
33
on:
44
push:
55
branches: [main]
6-
tags: ['v*.*.*']
6+
tags: ['v*']
77
pull_request:
88
branches: [main]
9+
workflow_dispatch:
910

1011
jobs:
1112
test:
@@ -34,7 +35,7 @@ jobs:
3435

3536
publish:
3637
needs: test
37-
if: startsWith(github.ref, 'refs/tags/v')
38+
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
3839
runs-on: ubuntu-latest
3940
permissions:
4041
id-token: write
@@ -54,7 +55,15 @@ jobs:
5455
uv pip install --system build
5556
python -m build
5657
58+
- name: Publish to Test PyPI
59+
if: github.event_name == 'workflow_dispatch'
60+
uses: pypa/gh-action-pypi-publish@release/v1
61+
with:
62+
repository-url: https://test.pypi.org/legacy/
63+
password: ${{ secrets.TEST_PYPI_TOKEN }}
64+
5765
- name: Publish to PyPI
66+
if: startsWith(github.ref, 'refs/tags/v')
5867
uses: pypa/gh-action-pypi-publish@release/v1
5968
with:
6069
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/publish-test-pypi.yml

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

0 commit comments

Comments
 (0)