Skip to content

Commit f07dfae

Browse files
Fix pypi trusted publisher (cherry pick from release/0.2) (#258)
1 parent dc7c390 commit f07dfae

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.github/workflows/ci_cd.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
type: choice
1414
options:
1515
- 'v1.2.0'
16+
- 'v1.3.45'
1617
- 'latest-dev'
1718

1819
push:
@@ -194,7 +195,7 @@ jobs:
194195
needs: [package, library-version]
195196
runs-on: ubuntu-latest
196197
steps:
197-
- uses: actions/download-artifact@v4
198+
- uses: actions/download-artifact@v5
198199
with:
199200
name: ansys-hps-data-transfer-client-artifacts
200201
path: /tmp/artifacts
@@ -239,11 +240,19 @@ jobs:
239240
id-token: write
240241
contents: write
241242
steps:
242-
- name: Release to the public PyPI repository
243-
uses: ansys/actions/release-pypi-public@v10
243+
- name: "Download the library artifacts from build-library step"
244+
uses: actions/download-artifact@v5
244245
with:
245-
library-name: ${{ env.PACKAGE_NAME }}
246-
use-trusted-publisher: true
246+
name: ${{ env.PACKAGE_NAME }}-artifacts
247+
path: ${{ env.PACKAGE_NAME }}-artifacts
248+
249+
- name: "Upload artifacts to PyPI using trusted publisher"
250+
uses: pypa/gh-action-pypi-publish@release/v1
251+
with:
252+
repository-url: "https://upload.pypi.org/legacy/"
253+
print-hash: true
254+
packages-dir: ${{ env.PACKAGE_NAME }}-artifacts
255+
skip-existing: false
247256

248257
- name: Release to GitHub
249258
uses: ansys/actions/release-github@v10

0 commit comments

Comments
 (0)