Skip to content

Commit 7b1ffdd

Browse files
Update publish.yml
1 parent 9a01ea5 commit 7b1ffdd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- "v*"
7+
workflow_dispatch: # Allows manual execution from GitHub Actions UI
78

89
jobs:
910
build-and-publish:
@@ -16,15 +17,20 @@ jobs:
1617
- name: Set up Python
1718
uses: actions/setup-python@v4
1819
with:
19-
python-version: "3.x"
20+
python-version: "3.10"
2021

2122
- name: Install build tools
2223
run: |
2324
python -m pip install --upgrade pip
2425
python -m pip install build twine
2526
2627
- name: Build package
27-
run: python -m build
28+
run: |
29+
rm -rf dist # Ensure a clean build
30+
python -m build
31+
32+
- name: Mask API Token
33+
run: echo "::add-mask::$TEST_PYPI_API_TOKEN"
2834

2935
- name: Publish to TestPyPI
3036
env:

0 commit comments

Comments
 (0)