Skip to content

Commit 9035534

Browse files
committed
feat: more changes hoping to get release-python.yml working
1 parent f3fd808 commit 9035534

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

{{cookiecutter.project_name}}/.github/workflows/release-python.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
env:
6262
# TestPyPI credentials stored as secrets in GitHub Settings -> Secrets
6363
TWINE_USERNAME: __token__ # Standard username when using API tokens
64-
TWINE_PASSWORD: {% raw %}${{ secrets.TESTPYPI_API_TOKEN }} {% endraw } # Use GitHub Encrypted Secret
64+
TWINE_PASSWORD: {% raw %}${{ secrets.TESTPYPI_API_TOKEN }}{% endraw } # Use GitHub Encrypted Secret
6565
# Optional: If uv publish requires different config for repository URL, pass TWINE_REPOSITORY or similar
6666
run: uvx nox -s publish-package -- --repository testpypi # Call the publish-package session, passing repository arg
6767

@@ -94,18 +94,18 @@ jobs:
9494
if: {% raw %}github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'){% endraw %}
9595

9696
steps:
97-
- name: Download package artifacts # Get packages built in the previous job
97+
- name: Download package artifacts
9898
uses: actions/download-artifact@v4
9999
with:
100-
name: distribution-packages # Must match the artifact name from build job
101-
path: dist/ # Download into the 'dist' directory
100+
name: distribution-packages
101+
path: dist/
102102

103-
- name: Set up Python # Needed to run uvx/publish task
103+
- name: Set up Python
104104
uses: actions/setup-python@v5
105105
with:
106-
python-version: {% raw %}3.x{% endraw %} # Same version as build job for consistency
106+
python-version-file: .python-version
107107

108-
- name: Set up uv # Install uv for this job
108+
- name: Set up uv
109109
uses: astral-sh/setup-uv@v6
110110

111111
# --- Publish to Production PyPI Step ---
@@ -116,7 +116,7 @@ jobs:
116116
env:
117117
# Production PyPI credentials stored as secrets in GitHub Settings -> Secrets
118118
TWINE_USERNAME: __token__
119-
TWINE_PASSWORD: {% raw %}[{% raw %} {{ "${{ secrets.PYPI_API_TOKEN }}" }} {% raw %}]{% endraw %} # Use GitHub Encrypted Secret
119+
TWINE_PASSWORD: {% raw %}${{ secrets.PYPI_API_TOKEN }}{% endraw %} # Use GitHub Encrypted Secret
120120
# Optional: TWINE_REPOSITORY if publishing to a custom production index
121121
run: uvx nox -s publish-package # Call the publish-package session (defaults to pypi.org)
122122

@@ -129,7 +129,7 @@ jobs:
129129
needs: build_and_testpypi
130130

131131
# Only run this job if triggered by a tag push
132-
if: {% raw %}github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'){% endraw %}
132+
if: {% raw %}(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'){% endraw %}
133133

134134
steps:
135135
- name: Download package artifacts # Get built artifacts for release assets

0 commit comments

Comments
 (0)