Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ jobs:
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}

release:
name: "Release"
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
Expand All @@ -162,17 +163,25 @@ jobs:
id-token: write
contents: write
steps:
- uses: ansys/actions/release-pypi-public@v9
name: "Release to public PyPI"
with:
library-name: ${{ env.LIBRARY_NAME }}
use-trusted-publisher: true
- name: "Download the library artifacts from build-library step"
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
name: ${{ env.PACKAGE_NAME }}-artifacts
path: ${{ env.PACKAGE_NAME }}-artifacts

- uses: ansys/actions/release-github@v9
name: "Release to GitHub"
with:
library-name: ${{ env.LIBRARY_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: "Upload artifacts to PyPI using trusted publisher"
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
with:
repository-url: "https://upload.pypi.org/legacy/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to specify the url?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the example the Pyansys team give in the migration docs, the only change I made was to update the version of actions/download-artifact

print-hash: true
packages-dir: ${{ env.PACKAGE_NAME }}-artifacts
skip-existing: false

- uses: ansys/actions/release-github@v9
name: "Release to GitHub"
with:
library-name: ${{ env.LIBRARY_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}

doc-deploy-stable:
name: "Deploy stable documentation"
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/777.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Revert to pypa/gh-action-pypi-publish for publishing