@@ -17,15 +17,15 @@ jobs:
17
17
name : Build package
18
18
runs-on : ubuntu-latest
19
19
steps :
20
- - uses : actions/checkout@v4
20
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21
21
22
22
- name : Setup Python
23
- uses : actions/setup-python@v5
23
+ uses : actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
24
24
with :
25
25
python-version : ${{ env.MAIN_PYTHON_VERSION }}
26
26
27
27
- name : Run protolint
28
- uses :
plexsystems/[email protected]
28
+ uses : plexsystems/protolint-action@7838989df3edefc91ea9370aadd5225e6bb73836 # v0.7.0
29
29
with :
30
30
configDirectory : .
31
31
@@ -48,14 +48,14 @@ jobs:
48
48
python -c "from ansys.api.geometry import __version__; print(__version__)"
49
49
50
50
- name : Upload packages
51
- uses : actions/upload-artifact@v4
51
+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
52
52
with :
53
53
name : ansys-api-geometry-artifacts
54
54
path : dist/
55
55
retention-days : 7
56
56
57
57
release :
58
- name : Release package
58
+ name : Release package to GitHub
59
59
if : github.event_name == 'push' && contains(github.ref, 'refs/tags')
60
60
needs : [build]
61
61
runs-on : ubuntu-latest
@@ -65,17 +65,41 @@ jobs:
65
65
id-token : write
66
66
contents : write
67
67
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
70
70
with :
71
- library- name : " ansys-api-geometry"
72
- use-trusted-publisher : true
71
+ name : ansys-api-geometry-artifacts
72
+ path : ansys-api-geometry-artifacts
73
73
74
74
- name : Release
75
- uses : softprops/action-gh-release@v2
75
+ uses : softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
76
76
with :
77
77
generate_release_notes : true
78
78
files : |
79
79
./**/*.whl
80
80
./**/*.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
0 commit comments