1414 MAIN_PYTHON_VERSION : 3.13
1515 DOCUMENTATION_CNAME : tools.docs.pyansys.com
1616
17+ permissions :
18+ contents : read
19+
1720jobs :
1821
1922 update-changelog :
2427 contents : write
2528 pull-requests : write
2629 steps :
27- - uses : ansys/actions/doc-deploy-changelog@v10
30+ - uses : ansys/actions/doc-deploy-changelog@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
2831 with :
2932 token : ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
3033 bot-user : ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
@@ -35,32 +38,43 @@ jobs:
3538 # name: "Check library vulnerabilities"
3639 # runs-on: ubuntu-latest
3740 # steps:
38- # - uses: ansys/actions/check-vulnerabilities@v10.0
41+ # - uses: ansys/actions/check-vulnerabilities@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
3942 # with:
4043 # python-version: ${{ env.MAIN_PYTHON_VERSION }}
4144 # token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
4245 # python-package-name: ${{ env.PACKAGE_NAME }}
4346 # dev-mode: ${{ github.ref != 'refs/heads/main' }}
4447
48+ actions-security :
49+ name : Check actions security
50+ runs-on : ubuntu-latest
51+ steps :
52+ - uses : ansys/actions/check-actions-security@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
53+ with :
54+ generate-summary : true
55+ token : ${{ secrets.GITHUB_TOKEN }}
56+ auditing-level : ' high'
57+
4558 style :
46- name : Code style
47- runs-on : ubuntu-latest
48- steps :
49- - name : PyAnsys code style checks
50- uses : ansys/actions/code-style@v10
51- with :
52- python-version : ${{ env.MAIN_PYTHON_VERSION }}
59+ name : Code style
60+ runs-on : ubuntu-latest
61+ steps :
62+ - name : PyAnsys code style checks
63+ uses : ansys/actions/code-style@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
64+ with :
65+ python-version : ${{ env.MAIN_PYTHON_VERSION }}
66+
5367 smoke-tests :
54- name : Build and Smoke tests
55- runs-on : ${{ matrix.os }}
56- strategy :
57- fail-fast : false
58- matrix :
59- os : [ubuntu-latest, windows-latest, macos-latest]
60- python-version : ['3.10', '3.11', '3.12']
61- steps :
68+ name : Build and Smoke tests
69+ runs-on : ${{ matrix.os }}
70+ strategy :
71+ fail-fast : false
72+ matrix :
73+ os : [ubuntu-latest, windows-latest, macos-latest]
74+ python-version : ['3.10', '3.11', '3.12']
75+ steps :
6276 - name : Build wheelhouse and perform smoke test
63- uses : ansys/actions/build-wheelhouse@v10
77+ uses : ansys/actions/build-wheelhouse@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
6478 with :
6579 library-name : ${{ env.PACKAGE_NAME }}
6680 operating-system : ${{ matrix.os }}
@@ -77,12 +91,13 @@ jobs:
7791
7892 steps :
7993 - name : Checkout repository
80- uses : actions/checkout@v3
94+ uses : actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
95+ with :
96+ persist-credentials : false
8197 - name : Set up Python
82- uses : actions/setup-python@v4
98+ uses : actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
8399 with :
84100 python-version : ${{ env.MAIN_PYTHON_VERSION }}
85- cache : ' pip'
86101
87102 - name : Install uv and create venv
88103 run : |
97112 uv pip install tests/launcher/pkg_with_entrypoint
98113 uv run pytest
99114
100- # - uses: codecov/codecov-action@v5
115+ # - uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
101116 # name: 'Upload coverage to CodeCov'
102117 # with:
103118 # token: ${{ secrets.CODECOV_TOKEN }}
@@ -107,7 +122,7 @@ jobs:
107122 runs-on : ubuntu-latest
108123 steps :
109124 - name : PyAnsys documentation style checks
110- uses : ansys/actions/doc-style@v10
125+ uses : ansys/actions/doc-style@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
111126 with :
112127 token : ${{ secrets.GITHUB_TOKEN }}
113128
@@ -117,21 +132,21 @@ jobs:
117132 runs-on : ubuntu-latest
118133 steps :
119134 - name : Build documentation
120- uses : ansys/actions/doc-build@v10
135+ uses : ansys/actions/doc-build@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
121136 with :
122137 python-version : ${{ env.MAIN_PYTHON_VERSION }}
123138 check-links : false # Delete after first release
124139
125140 package :
126- name : Package library
127- runs-on : ubuntu-latest
128- needs : [tests, doc-build]
129- steps :
130- - name : Build library source and wheel artifacts
131- uses : ansys/actions/build-library@v10
132- with :
133- library-name : ${{ env.PACKAGE_NAME }}
134- python-version : ${{ env.MAIN_PYTHON_VERSION }}
141+ name : Package library
142+ runs-on : ubuntu-latest
143+ needs : [tests, doc-build]
144+ steps :
145+ - name : Build library source and wheel artifacts
146+ uses : ansys/actions/build-library@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
147+ with :
148+ library-name : ${{ env.PACKAGE_NAME }}
149+ python-version : ${{ env.MAIN_PYTHON_VERSION }}
135150
136151 release :
137152 name : Release project
@@ -159,14 +174,14 @@ jobs:
159174 # skip-existing: false
160175
161176 - name : " Release to the private PyPI repository"
162- uses : ansys/actions/release-pypi-private@v9
177+ uses : ansys/actions/release-pypi-private@495ca3d79c1627f5b96c469cfbe799718e9dc35f # v9.0.13
163178 with :
164179 library-name : " ansys-tools-common"
165180 twine-username : " __token__"
166181 twine-token : ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
167182
168183 - name : Release to GitHub
169- uses : ansys/actions/release-github@v10
184+ uses : ansys/actions/release-github@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
170185 with :
171186 token : ${{ secrets.GITHUB_TOKEN }}
172187 library-name : ${{ env.PACKAGE_NAME }}
@@ -176,11 +191,13 @@ jobs:
176191 if : github.event_name == 'push' && contains(github.ref, 'refs/tags')
177192 runs-on : ubuntu-latest
178193 needs : [release]
194+ permissions :
195+ contents : write
179196 steps :
180197 - name : Deploy the stable documentation
181- uses : ansys/actions/doc-deploy-stable@v10
198+ uses : ansys/actions/doc-deploy-stable@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
182199 with :
183200 cname : ${{ env.DOCUMENTATION_CNAME }}
184201 token : ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
185202 bot-user : ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
186- bot-email : ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
203+ bot-email : ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
0 commit comments