File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
{{cookiecutter.project_name}}/.github/workflows Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ def test_rendered_project(
132132 cd_data = yaml .safe_load (f .read ())
133133 assert ci_data ["env" ]["ENABLE_COVERAGE" ] == enable_coverage
134134 assert cd_data ["env" ]["ENABLE_PYPI_PUBLISH" ] == enable_pypi_publish
135- assert cd_data ["env" ]["ENABLE_TEST_PYPI_PUBLISH" ] == enable_pypi_publish
135+ assert cd_data ["env" ]["ENABLE_TEST_PYPI_PUBLISH" ] is False
136136
137137 assert not (
138138 subprocess .check_output (
Original file line number Diff line number Diff line change @@ -3,22 +3,26 @@ name: Release
33
44env :
55 ENABLE_PYPI_PUBLISH : {{ "true" if cookiecutter.enable_pypi_publish|lower == "yes" else "false" }}
6- ENABLE_TEST_PYPI_PUBLISH : {{ "true" if cookiecutter.enable_pypi_publish|lower == "yes" else " false" }}
6+ ENABLE_TEST_PYPI_PUBLISH : false
77 RELEASE_PYTHON_VERSION : " 3.12"
88 RELEASE_POETRY_VERSION : " 2.0"
99
1010on :
1111 push :
1212 tags :
1313 - ' *'
14- workflow_dispatch :
1514
1615jobs :
1716 Publish :
1817 name : Publish package for ${{ "{{" }} github.ref_name }}
1918
2019 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
2120 runs-on : ubuntu-latest
21+ environment :
22+ name : pypi
23+ url : https://pypi.org/p/{{ cookiecutter.project_name }}
24+ permissions :
25+ id-token : write
2226
2327 steps :
2428 - name : 💾 Check out repository
@@ -49,15 +53,12 @@ jobs:
4953 uses : pypa/gh-action-pypi-publish@release/v1
5054 if : ${{ "{{" }} env.ENABLE_TEST_PYPI_PUBLISH == 'true' }}
5155 with :
52- password : ${{ "{{" }} secrets.TEST_PYPI_API_TOKEN }}
5356 repository-url : https://test.pypi.org/legacy/
5457 skip-existing : true
5558
5659 - name : ☢️ Publish to PyPI
5760 if : ${{ "{{" }} env.ENABLE_PYPI_PUBLISH == 'true' }}
5861 uses : pypa/gh-action-pypi-publish@release/v1
59- with :
60- password : ${{ "{{" }} secrets.PYPI_API_TOKEN }}
6162
6263concurrency :
6364 group : ${{ "{{" }} github.workflow }}-${{ "{{" }} github.ref }}
You can’t perform that action at this time.
0 commit comments