55 release :
66 types : [published]
77
8- # Declare default permissions as read only.
9- permissions : read-all
8+ permissions : {} # No permissions by default on workflow level
109
1110jobs :
1211 build :
1312 name : Build
1413 runs-on : ubuntu-latest
1514 steps :
1615 - name : Checkout
17- uses : actions/checkout@v4
16+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17+ with :
18+ persist-credentials : false
1819 - name : Set up Python 3.10
19- uses : actions/setup-python@v5
20+ uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2021 with :
2122 python-version : " 3.10"
2223 - name : Install pypa/build
@@ -25,14 +26,14 @@ jobs:
2526 - name : Build sdist
2627 run : |
2728 python -m build --sdist src/python/
28- - uses : actions/upload-artifact@v4
29+ - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
2930 with :
3031 name : artifact-sdist
3132 path : src/python/dist/*.tar.gz
3233 - name : Build wheel
3334 run : |
3435 python -m build --wheel src/python/
35- - uses : actions/upload-artifact@v4
36+ - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
3637 with :
3738 name : artifact-wheel
3839 path : src/python/dist/*.whl
4344 environment : pypi
4445 runs-on : ubuntu-latest
4546 permissions :
46- packages : write
47- contents : write
48- id-token : write
47+ contents : write # required by svenstaro/upload-release-action
48+ id-token : write # required by trusted publisher
4949 steps :
5050 - name : Download artifacts
5151 uses : actions/download-artifact@v4
@@ -56,13 +56,13 @@ jobs:
5656 # to determine where to publish the package distribution to PyPI or TestPyPI
5757 - name : Check tag
5858 id : check-tag
59- uses : actions-ecosystem/action-regex-match@v2
59+ uses : actions-ecosystem/action-regex-match@9e6c4fb3d5e898f505be7a1fb6e7b0a278f6665b # v2.0.2
6060 with :
6161 text : ${{ github.ref }}
6262 regex : ' ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)+(\.[0-9]+rc[0-9]+|rc[0-9]+)?$'
6363 - name : Upload package distributions to github
6464 if : ${{ steps.check-tag.outputs.match != '' }}
65- uses : svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
65+ uses : svenstaro/upload-release-action@ebd922b779f285dafcac6410a0710daee9c12b82 # v2.10.0
6666 with :
6767 repo_token : ${{ secrets.GITHUB_TOKEN }}
6868 file : dist/*
@@ -71,10 +71,10 @@ jobs:
7171 file_glob : true
7272 - name : Publish package distributions to PyPI
7373 if : ${{ steps.check-tag.outputs.match != '' }}
74- uses : pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 # v1.12.3
74+ uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
7575 - name : Publish package distributions to TestPyPI
7676 if : ${{ steps.check-tag.outputs.match == '' }}
77- uses : pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 # v1.12.3
77+ uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
7878 with :
7979 repository-url : https://test.pypi.org/legacy/
8080 verbose : true
0 commit comments