Skip to content

Commit 3115d59

Browse files
committed
Bump version 0.10.2
1 parent f7ae843 commit 3115d59

File tree

12 files changed

+245
-110
lines changed

12 files changed

+245
-110
lines changed

.github/actions/build-library/action.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description: |
1313
was provided up to v3 of the ansys/actions action.
1414
1515
pysystem-coupling relies on this because API modules are generated in-place
16-
in the checkout area in the preceding build ready for packaging, and a
16+
in the checkout area in the preceding build ready for packaging, and a
1717
re-checkout blows this away.
1818
1919
.. note::
@@ -65,8 +65,11 @@ runs:
6565
steps:
6666

6767
- name: "Install Git and clone project"
68-
uses: actions/checkout@v4
68+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
6969
if: inputs.checkout == 'true'
70+
with:
71+
persist-credentials: false
72+
7073

7174
- name: "Set up Python"
7275
uses: ansys/actions/_setup-python@main
@@ -85,7 +88,7 @@ runs:
8588
python -m build && python -m twine check dist/*
8689
8790
- name: "Upload distribution artifacts to GitHub artifacts"
88-
uses: actions/upload-artifact@v4
91+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
8992
with:
9093
name: ${{ inputs.library-name }}-artifacts
9194
path: dist/

.github/actions/unit-test/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ runs:
3030

3131
- name: Upload coverage to Codecov
3232
if: ${{ inputs.upload-coverage }}
33-
uses: codecov/codecov-action@v3
33+
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3.1.6
3434

3535
- name: Upload test coverage
3636
if: ${{ inputs.upload-coverage }}
37-
uses: actions/upload-artifact@v4
37+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
3838
with:
3939
name: HTML-coverage-syc
4040
path: cov_html

.github/workflows/ci.yml

Lines changed: 63 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,34 @@ env:
1717
DOC_BUILD_SYC_VERSION: 25_2
1818
FLUENT_IMAGE_VERSION: "v25.2.0"
1919
SYC_IMAGE_VERSION: "v25.2.0"
20-
MAPDL_IMAGE_VERSION: "v25.1-ubuntu"
20+
MAPDL_IMAGE_VERSION: "v25.1-ubuntu-cicd" # TODO: update to 25.2
21+
22+
permissions: {} # Zero permissions can be granted at the workflow level if not all jobs require permissions.
23+
# As a good rule of thumb, this normally includes jobs that don't use secrets.
2124

2225
concurrency:
2326
group: ${{ github.workflow }}-${{ github.ref }}
2427
cancel-in-progress: true
2528

2629
jobs:
2730

31+
actions-security:
32+
name: "Check actions security"
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: ansys/actions/check-actions-security@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
36+
with:
37+
generate-summary: true
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
auditing-level: 'high'
40+
trust-ansys-actions: true
41+
2842
doc-style:
2943
name: "Documentation style check"
3044
runs-on: ubuntu-latest
3145
steps:
3246
- name: "PySystemCoupling documentation style checks"
33-
uses: ansys/actions/doc-style@v10
47+
uses: ansys/actions/doc-style@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
3448
with:
3549
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
3650
vale-version: "3.4.1"
@@ -40,7 +54,7 @@ jobs:
4054
runs-on: ubuntu-latest
4155
steps:
4256
- name: PyAnsys code style checks
43-
uses: ansys/actions/code-style@v10
57+
uses: ansys/actions/code-style@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
4458
with:
4559
python-version: ${{ env.MAIN_PYTHON_VERSION }}
4660

@@ -56,17 +70,18 @@ jobs:
5670

5771
steps:
5872
- name: "Build wheelhouse and perform smoke test"
59-
uses: ansys/actions/build-wheelhouse@v10
73+
uses: ansys/actions/build-wheelhouse@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
6074
with:
6175
library-name: ${{ env.PACKAGE_NAME }}
6276
operating-system: ${{ matrix.os }}
6377
python-version: ${{ matrix.python-version }}
6478

79+
6580
check-vulnerabilities:
6681
name: "Check library vulnerabilities"
6782
runs-on: ubuntu-latest
6883
steps:
69-
- uses: ansys/actions/check-vulnerabilities@v10.0
84+
- uses: ansys/actions/check-vulnerabilities@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
7085
with:
7186
python-version: ${{ env.MAIN_PYTHON_VERSION }}
7287
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
@@ -75,23 +90,27 @@ jobs:
7590
#upload-reports: True
7691
#hide-log: false
7792

93+
7894
build:
7995
name: Build package, incl. API generation
8096
needs: [smoke-tests]
8197
runs-on: ubuntu-latest
8298

8399
steps:
84-
- uses: actions/checkout@v4
100+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
101+
with:
102+
persist-credentials: false
103+
85104
- name: Setup Python
86-
uses: actions/setup-python@v5
105+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
87106
with:
88107
python-version: ${{ env.MAIN_PYTHON_VERSION }}
89108

90109
- name: Create initial wheel and install
91110
run: make build-install
92111

93112
- name: Login to GitHub Container Registry
94-
uses: docker/login-action@v3
113+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
95114
with:
96115
registry: ghcr.io
97116
username: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
@@ -153,14 +172,16 @@ jobs:
153172
runs-on: ubuntu-latest
154173

155174
steps:
156-
- uses: actions/checkout@v4
175+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
176+
with:
177+
persist-credentials: false
157178
- name: Setup Python
158-
uses: actions/setup-python@v5
179+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
159180
with:
160181
python-version: ${{ env.MAIN_PYTHON_VERSION }}
161182

162183
- name: Download package
163-
uses: actions/download-artifact@v4
184+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
164185
with:
165186
name: ${{ env.PACKAGE_NAME }}-artifacts
166187
path: dist
@@ -171,7 +192,7 @@ jobs:
171192
pip install -q --force-reinstall ${wheel_name}[tests] > /dev/null
172193
173194
- name: Login to GitHub Container Registry
174-
uses: docker/login-action@v3
195+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
175196
with:
176197
registry: ghcr.io
177198
username: ${{ secrets.GH_USERNAME }}
@@ -229,15 +250,21 @@ jobs:
229250
name: Build Documentation
230251
needs: [doc-style, build]
231252
runs-on: public-ubuntu-latest-8-cores
253+
permissions:
254+
contents: write
255+
packages: read
256+
232257
steps:
233-
- uses: actions/checkout@v4
258+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
259+
with:
260+
persist-credentials: false
234261
- name: Setup Python
235-
uses: actions/setup-python@v5
262+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
236263
with:
237264
python-version: ${{ env.MAIN_PYTHON_VERSION }}
238265

239266
- name: Download package
240-
uses: actions/download-artifact@v4
267+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
241268
with:
242269
name: ${{ env.PACKAGE_NAME }}-artifacts
243270
path: dist
@@ -248,7 +275,7 @@ jobs:
248275
pip install -q --force-reinstall ${wheel_name}[doc] > /dev/null
249276
250277
- name: Docker Login
251-
uses: docker/login-action@v3
278+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
252279
with:
253280
registry: ghcr.io
254281
username: ${{ github.actor }}
@@ -299,7 +326,7 @@ jobs:
299326
# extra_mem_top: 30000000
300327

301328
- name: Upload HTML Documentation
302-
uses: actions/upload-artifact@v4
329+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
303330
with:
304331
name: documentation-html
305332
path: doc/_build/html
@@ -318,9 +345,11 @@ jobs:
318345
if: github.ref == 'refs/heads/main'
319346
runs-on: ubuntu-latest
320347
needs: [docs]
348+
permissions:
349+
contents: write
321350
steps:
322351
- name: Deploy the latest documentation
323-
uses: ansys/actions/doc-deploy-dev@v10
352+
uses: ansys/actions/doc-deploy-dev@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
324353
with:
325354
cname: ${{ env.DOCUMENTATION_CNAME }}
326355
token: ${{ secrets.GITHUB_TOKEN }}
@@ -333,35 +362,30 @@ jobs:
333362
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
334363
needs: [test, docs]
335364
runs-on: ubuntu-latest
365+
permissions:
366+
id-token: write
336367
steps:
337-
- name: Release to the private PyPI repository
338-
uses: ansys/actions/release-pypi-private@v10
339-
with:
340-
library-name: ${{ env.PACKAGE_NAME }}
341-
twine-username: "__token__"
342-
twine-token: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
343368

344-
- name: "Release to the public PyPI repository"
345-
uses: ansys/actions/release-pypi-public@v10
369+
- name: "Download the library artifacts from build-library step"
370+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
346371
with:
347-
library-name: ${{ env.PACKAGE_NAME }}
348-
twine-username: "__token__"
349-
twine-token: ${{ secrets.PYPI_TOKEN }}
350-
351-
# TODO: We can't use ansys/actions/release-github as it assumes PDF doc.
352-
- name: Set up Python
353-
uses: actions/setup-python@v5
354-
with:
355-
python-version: ${{ env.MAIN_PYTHON_VERSION }}
372+
name: ${{ env.PACKAGE_NAME }}-artifacts
373+
path: ${{ env.PACKAGE_NAME }}-artifacts
356374

357-
- uses: actions/checkout@v4
358-
- uses: actions/download-artifact@v4
359375

360376
- name: Display structure of downloaded files
361377
run: ls -R
362378

379+
- name: "Upload artifacts to PyPI using trusted publisher"
380+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
381+
with:
382+
repository-url: "https://upload.pypi.org/legacy/"
383+
print-hash: true
384+
packages-dir: ${{ env.PACKAGE_NAME }}-artifacts
385+
skip-existing: false
386+
363387
- name: "Release to GitHub"
364-
uses: softprops/action-gh-release@v2
388+
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
365389
with:
366390
files: |
367391
./**/*.whl
@@ -375,7 +399,7 @@ jobs:
375399
needs: [release]
376400
steps:
377401
- name: Deploy the stable documentation
378-
uses: ansys/actions/doc-deploy-stable@v10
402+
uses: ansys/actions/doc-deploy-stable@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
379403
with:
380404
cname: ${{ env.DOCUMENTATION_CNAME }}
381405
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/label.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,19 @@ concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}
1111
cancel-in-progress: true
1212

13+
permissions: {} # Zero permissions can be granted at the workflow level if not all jobs require permissions.
14+
# As a good rule of thumb, this normally includes jobs that don't use secrets.
15+
1316
jobs:
1417

1518
label-syncer:
1619
name: Syncer
1720
runs-on: ubuntu-latest
1821
steps:
19-
- uses: actions/checkout@v4
20-
- uses: micnncim/action-label-syncer@v1
22+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23+
with:
24+
persist-credentials: false
25+
- uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0
2126
env:
2227
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2328

@@ -32,43 +37,44 @@ jobs:
3237

3338
# Label based on modified files
3439
- name: Label based on changed files
35-
uses: actions/labeler@v5
40+
uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
3641
with:
3742
repo-token: ${{ secrets.GITHUB_TOKEN }}
3843

3944
# Label based on branch name
40-
- uses: actions-ecosystem/action-add-labels@v1
45+
- uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
4146
if: |
42-
startsWith(github.event.pull_request.head.ref, 'doc') ||
47+
startsWith(github.event.pull_request.head.ref, 'doc') ||
4348
startsWith(github.event.pull_request.head.ref, 'docs')
4449
with:
4550
labels: documentation
4651

47-
- uses: actions-ecosystem/action-add-labels@v1
52+
- uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
4853
if: |
4954
startsWith(github.event.pull_request.head.ref, 'maint') ||
5055
startsWith(github.event.pull_request.head.ref, 'no-ci') ||
5156
startsWith(github.event.pull_request.head.ref, 'ci')
5257
with:
5358
labels: maintenance
5459

55-
- uses: actions-ecosystem/action-add-labels@v1
60+
- uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
5661
if: startsWith(github.event.pull_request.head.ref, 'feat')
5762
with:
5863
labels: |
5964
enhancement
60-
- uses: actions-ecosystem/action-add-labels@v1
65+
- uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
6166
if: |
6267
startsWith(github.event.pull_request.head.ref, 'fix') ||
6368
startsWith(github.event.pull_request.head.ref, 'patch')
6469
with:
6570
labels: bug
6671

6772
commenter:
73+
name: Commenter to suggest adding labels
6874
runs-on: ubuntu-latest
6975
steps:
7076
- name: Suggest to add labels
71-
uses: peter-evans/create-or-update-comment@v4
77+
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
7278
# Execute only when no labels have been applied to the pull request
7379
if: toJSON(github.event.pull_request.labels.*.name) == '{}'
7480
with:
@@ -80,4 +86,4 @@ jobs:
8086
- [enhancement](https://github.com/ansys/pysystem-coupling/pulls?q=label%3Aenhancement+)
8187
- [good first issue](https://github.com/ansys/pysystem-coupling/pulls?q=label%3Agood+first+issue)
8288
- [maintenance](https://github.com/ansys/pysystem-coupling/pulls?q=label%3Amaintenance+)
83-
- [release](https://github.com/ansys/pysystem-coupling/pulls?q=label%3Arelease+)
89+
- [release](https://github.com/ansys/pysystem-coupling/pulls?q=label%3Arelease+)

0 commit comments

Comments
 (0)