@@ -13,12 +13,13 @@ jobs:
1313 runs-on : ubuntu-latest
1414
1515 steps :
16- - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
16+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1717 # use fetch --all for setuptools_scm to work
1818 with :
1919 fetch-depth : 0
20+ persist-credentials : false
2021 - name : Set up Python
21- uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
22+ uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
2223 with :
2324 python-version : ' 3.x'
2425
@@ -32,19 +33,19 @@ jobs:
3233 run : twine check dist/*
3334
3435 - name : Create attestations
35- uses : actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3
36+ uses : actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
3637 with :
3738 subject-path : ' dist/*'
3839
3940 - name : Publish package (to TestPyPI)
40- if : github.event_name == 'workflow_dispatch' && startsWith(github.repository , 'cpp-linter ')
41+ if : startsWith( github.repository, 'cpp-linter') && ! startsWith(github.ref , 'refs/tags/ ')
4142 env :
4243 TWINE_USERNAME : __token__
4344 TWINE_PASSWORD : ${{ secrets.TEST_PYPI_TOKEN }}
4445 run : twine upload --repository testpypi dist/*
4546
4647 - name : Publish package (to PyPI)
47- if : github.event_name != 'workflow_dispatch' && startsWith(github.repository , 'cpp-linter ')
48+ if : startsWith( github.repository, 'cpp-linter') && startsWith(github.ref , 'refs/tags/ ')
4849 env :
4950 TWINE_USERNAME : __token__
5051 TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
0 commit comments