From 96aee6bcd2c5917adc46c3321ee8609f2bff2080 Mon Sep 17 00:00:00 2001 From: Nayane Fernandes <143632290+ansnfernand@users.noreply.github.com> Date: Mon, 24 Nov 2025 15:15:18 +0100 Subject: [PATCH 1/2] ci: updated Release action and added Check PR name --- .github/workflows/ci_cd.yml | 45 +++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 2462e9830..fd5d11fc8 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -133,23 +133,50 @@ jobs: release: name: Release project - if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - needs: [ package ] + if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }} + needs: [ package, update-changelog ] runs-on: ubuntu-latest + # Specifying a GitHub environment is optional, but strongly encouraged + environment: release + permissions: + id-token: write + contents: write steps: - - name: Release to the public PyPI repository - uses: ansys/actions/release-pypi-public@v10 + - name: "Download the library artifacts from build-library step" + uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 with: - library-name: ${{ env.PACKAGE_NAME }} - twine-username: "__token__" - twine-token: ${{ secrets.PYPI_TOKEN }} + name: ${{ env.PACKAGE_NAME }}-artifacts + path: ${{ env.PACKAGE_NAME }}-artifacts + + - name: "Display structure of downloaded files" + run: ls -Rla + + - name: "Release to PyPI using trusted publisher" + uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 + with: + repository-url: "https://upload.pypi.org/legacy/" + print-hash: true + packages-dir: ${{ env.PACKAGE_NAME }}-artifacts + skip-existing: false - - name: Release to GitHub - uses: ansys/actions/release-github@v10 + - name: "Release to GitHub" + uses: ansys/actions/release-github@c2fa7c93f6883114e0e643599431b33d29f0b13f #v10.1.4 with: library-name: ${{ env.PACKAGE_NAME }} token: ${{ secrets.GITHUB_TOKEN }} + pull-request-name: + if: github.event_name == 'pull_request' + name: Check the name of the pull-request + runs-on: ubuntu-latest + permissions: + pull-requests: read + steps: + - name: Check pull-request name + uses: ansys/actions/check-pr-title@c2fa7c93f6883114e0e643599431b33d29f0b13f #v10.1.4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + upload_dev_docs: name: Upload dev documentation if: github.ref == 'refs/heads/main' From 5a1b2dc73323137b14a677f7aeabd9080df050a9 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Mon, 24 Nov 2025 14:18:24 +0000 Subject: [PATCH 2/2] chore: adding changelog file 673.miscellaneous.md [dependabot-skip] --- doc/changelog.d/673.miscellaneous.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/673.miscellaneous.md diff --git a/doc/changelog.d/673.miscellaneous.md b/doc/changelog.d/673.miscellaneous.md new file mode 100644 index 000000000..672ab698f --- /dev/null +++ b/doc/changelog.d/673.miscellaneous.md @@ -0,0 +1 @@ +Ci: updated Release action and added Check PR name