Skip to content

Commit 8a915f2

Browse files
authored
ci: upgrade to ansys/actions v9 (#158)
1 parent 5ba1dec commit 8a915f2

File tree

4 files changed

+39
-15
lines changed

4 files changed

+39
-15
lines changed

.github/workflows/autorelease.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
# Checkout the repository
2121
- name: Checkout Repository
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2323
with:
2424
fetch-depth: 0
2525
fetch-tags: true

.github/workflows/ci.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
name: Build package
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2121

2222
- name: Setup Python
23-
uses: actions/setup-python@v5
23+
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
2424
with:
2525
python-version: ${{ env.MAIN_PYTHON_VERSION }}
2626

2727
- name: Run protolint
28-
uses: plexsystems/[email protected]
28+
uses: plexsystems/protolint-action@7838989df3edefc91ea9370aadd5225e6bb73836 # v0.7.0
2929
with:
3030
configDirectory: .
3131

@@ -48,14 +48,14 @@ jobs:
4848
python -c "from ansys.api.geometry import __version__; print(__version__)"
4949
5050
- name: Upload packages
51-
uses: actions/upload-artifact@v4
51+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5252
with:
5353
name: ansys-api-geometry-artifacts
5454
path: dist/
5555
retention-days: 7
5656

5757
release:
58-
name: Release package
58+
name: Release package to GitHub
5959
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
6060
needs: [build]
6161
runs-on: ubuntu-latest
@@ -65,17 +65,41 @@ jobs:
6565
id-token: write
6666
contents: write
6767
steps:
68-
- name: Release to the public PyPI repository
69-
uses: ansys/actions/release-pypi-public@v8
68+
- name: "Download the library artifacts from build-library step"
69+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
7070
with:
71-
library-name: "ansys-api-geometry"
72-
use-trusted-publisher: true
71+
name: ansys-api-geometry-artifacts
72+
path: ansys-api-geometry-artifacts
7373

7474
- name: Release
75-
uses: softprops/action-gh-release@v2
75+
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
7676
with:
7777
generate_release_notes: true
7878
files: |
7979
./**/*.whl
8080
./**/*.tar.gz
81-
./**/*.pdf
81+
82+
release-pypi:
83+
name: Release project to PyPI
84+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
85+
needs: [build]
86+
runs-on: ubuntu-latest
87+
# Specifying a GitHub environment is optional, but strongly encouraged
88+
environment: release
89+
permissions:
90+
id-token: write
91+
contents: write
92+
steps:
93+
- name: "Download the library artifacts from build-library step"
94+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
95+
with:
96+
name: ansys-api-geometry-artifacts
97+
path: ansys-api-geometry-artifacts
98+
99+
- name: "Upload artifacts to PyPI using trusted publisher"
100+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
101+
with:
102+
repository-url: "https://upload.pypi.org/legacy/"
103+
print-hash: true
104+
packages-dir: ansys-api-geometry-artifacts
105+
skip-existing: false

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[build-system]
22
requires = [
3-
"setuptools >= 42.0.0, <77", # TODO: REMOVE UPPER LIMIT ONCE IT IS ADAPTED ON THE RELEASE ACTION
3+
"setuptools >= 42.0.0",
44
"wheel",
55
"ansys_tools_protoc_helper>=0.4.0",
6-
"ansys-api-dbu==0.3.16",
6+
"ansys-api-dbu==0.3.17",
77
]
88
build-backend = "setuptools.build_meta:__legacy__"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
url=f"https://github.com/ansys/{package_name}",
4040
license="MIT",
4141
python_requires=">=3.10",
42-
install_requires=["grpcio~=1.44", "protobuf>=3.19,<6", "ansys-api-dbu==0.3.16"],
42+
install_requires=["grpcio~=1.44", "protobuf>=3.19,<6", "ansys-api-dbu==0.3.17"],
4343
packages=setuptools.find_namespace_packages(".", include=("ansys.*",)),
4444
package_data={
4545
"": ["*.proto", "*.pyi", "py.typed", "VERSION"],

0 commit comments

Comments
 (0)