Skip to content

Commit 503da91

Browse files
committed
workflow to automatically test prior to pushing to pypi
1 parent 5c5aace commit 503da91

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/build_package.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ on:
55
workflow_dispatch: # Allow manual triggering
66

77
jobs:
8+
test:
9+
uses: ./.github/workflows/ci.yml
10+
811
build-and-publish:
12+
needs: test
913
runs-on: ubuntu-latest
1014
steps:
1115
- uses: actions/checkout@v4
@@ -36,7 +40,8 @@ jobs:
3640
- name: Publish to TestPyPI
3741
if: github.event_name == 'workflow_dispatch'
3842
run: |
39-
uv publish --index testpypi
43+
uv publish
4044
4145
env:
42-
UV_PUBLISH_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
46+
TWINE_USERNAME: __token__
47+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
pull_request:
66
branches: [main]
7+
workflow_call:
8+
79

810
jobs:
911
lint-and-test:

0 commit comments

Comments
 (0)