Migration guide#
This guide provides information on new features, breaking changes, how to migrate from one version of the actions to another, and other upstream dependencies that have been updated.
Version v10.1#
New Features:
ansys/actions/doc-deploy-stableaction now supports pre-releases. The identifiers must be one ofa|b|rcfor alpha, beta, and release candidates respectively. Furthermore, only patch pre-release are supported, meaning the PEP 440 <https://peps.python.org/pep-0440/> compliant version identifiers are limited to those that comply with the following scheme:N.N.N[{a|b|rc}N]Note
In the same pre-release cycle, documentation is retained for a maximum of three pre-release versions and removed following a normal release.
Added a
checkoutoption (default:true) tobuild-library,check-actions-security, andcode-styleactions. Settingcheckouttofalseallows reuse of the workspace from a prior step without modification.Introduced an
upload-artifact-name-prefixoption (default:documentation) in thedoc-buildaction, enabling customization of uploaded documentation artifact names. This also allows distinct documentation artifacts to be uploaded for separate documentation build jobs within the same workflow.
Migration Steps:
For Poetry-based projects, ensure that you provide the correct values for
optional-dependencies-name(default:doc) andgroup-dependencies-name.optional-dependencies-name: Refers to the extras defined in thepyproject.tomlfile.group-dependencies-name: Refers to the dependency groups defined in the same file.
If your documentation dependencies are defined as extras, changes to your workflow are likely not needed since the default value for
optional-dependencies-namewill target thedocextra. However, using dependency groups (as is the case with most PyAnsys libraries) requires the following update to your workflow:doc-build: name: Documentation Build runs-on: ubuntu-latest steps: - name: "Run Ansys documentation building action" uses: ansys/actions/doc-build@33399106dc8b62d83c8aad1fb2c333c8055df180 # v10.0.20 with: check-links: false dependencies: "pandoc" sphinxopts: "-n -W --keep-going"
doc-build: name: Documentation Build runs-on: ubuntu-latest steps: - name: "Run Ansys documentation building action" uses: ansys/actions/doc-build@ed773aba3478d311decff2d4313e0cd19a945dd8 # v10.1.0 with: check-links: false dependencies: "pandoc" sphinxopts: "-n -W --keep-going" optional-dependencies-name: "" group-dependencies-name: "doc"
Version v10#
New Features:
Workflow Security Audits: Introduced
ansys/action/check-actions-securityto audit workflow files for security and vulnerability issues. Provides summary and detailed reports using the zizmor static analysis tool. See zizmor audit rules for information about detected issues and their remediation.PR Documentation Deployment: Added
ansys/action/doc-deploy-prto deploy HTML documentation for pull requests athttps://<cname>/pull/<pr-number>/. Documentation is automatically removed when the pull request is closed. Refer to Deploy documentation from a pull request for setup details.Faster Package Installation: Added a
use-uvoption (default: true) tobuild-library,build-wheelhouse,check-licenses,check-vulnerabilities,code-style,doc-build,doc-changelog,doc-deply-changelog,hk-package-clean-except,hk-package-clean-untagged,release-github, andtests-pytestactions. This leverages uv for faster package installation, improving workflow speed for projects with multiple dependencies.About pre-releases and extra indices
The installation of pre-releases by
uvis only supported if these are listed in thepyproject.tomlfile. If you wish to install pre-releases at all levels, you must set theUV_PRERELEASE=allowenvironment variable.Regarding extra indices,
uvsupports theUV_EXTRA_INDEX_URLfor specifying extra indices. This is the equivalent to thePIP_EXTRA_INDEX_URLenvironment variable.Dependency Groups Support:
doc-buildandtests-pytestactions now support PEP 735 dependency groups via thegroup-dependencies-nameinput. Extras remain supported through theoptional-dependencies-nameinput.SBOM Generation:
build-wheelhouseaction now generates a Software Bill of Materials (SBOM) in SPDX format and uploads it as an artifact. This SBOM is generated using Syft. Note that the SBOM artifacts are now included in the Github release.
Breaking Changes:
Python Version Support: Dropped support for Python versions below
3.9.JSON Builder Removal:
ansys/actions/doc-buildno longer supports theJSONbuilder for documentation rendering.Dependency Groups Parsing: Replaced the
tomllibrary withtomliindoc-style,doc-changelog, andrelease-githubactions due to improved support forpyproject.tomlfiles with nested dependency groups. Thetomli-versioninput replaces the formertoml-versioninput.Build-Wheelhouse Changes: the
build-wheelhouseaction now installs packages in a virtual environment instead of at the system level. If you have subsequent workflow steps (e.g., running smoke tests) that depend on these packages, activate the virtual environment using the action’sactivate-venvoutput. For example:build-wheelhouse-and-smoke-test: name: Build wheelhouse and perform smoke test runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, windows-latest] python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - name: Build wheelhouse id: build-wheelhouse uses: ansys/actions/build-wheelhouse@v10 with: library-name: ${{ env.PACKAGE_NAME }} operating-system: ${{ matrix.os }} python-version: ${{ matrix.python-version }} check-licenses: true - name: Perform additional smoke tests shell: bash run: | ${{ steps.build-wheelhouse.outputs.activate-venv }} <smoke-test-command>
Version v9.0#
Breaking changes:
Use
ansys/actions/check-licensesactions with Python version 3.10 or higher.To use
check-licenses: truewith theansys/actions/build-wheelhouseaction, use Python version 3.10 or higher.Update your workflow to not use
use-trusted-publisher: truewith our pypi release actions.Warning
Using the trusted publisher approach in
ansys/release-pypi-publicandansys/release-pypi-privateactions is not possible anymore. The reason for that is related to the action pypa/gh-action-pypi-publish which allows to use the trusted publisher. Indeed, it is no longer possible to use the action in a composite action for versions afterv1.12.0, see pypa/gh-action-pypi-publish@v1.12.0. However, the latest versions of this action is required to upload PEP 639 licensing metadata to PyPI. This allows to avoid adding upper bounds on build system likesetuptools<=67.0.0,wheel<0.46.0orflit_core>=3.2,<3.11.
Migration Steps:
Update input
python-versionto3.10or higher in theansys/actions/check-licensesaction or in theansys/actions/build-wheelhouseaction if you are using thecheck-licensesinput.For example:
build-wheelhouse: name: Build wheelhouse runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, windows-latest] python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - name: Build wheelhouse and perform smoke test uses: ansys/actions/build-wheelhouse@v9 with: library-name: ${{ env.PACKAGE_NAME }} operating-system: ${{ matrix.os }} python-version: ${{ matrix.python-version }}
When using trusted publisher to publish to PyPI, define you own release job instead of using the
ansys/actions/release-pypi-*actions. See Release to PyPI as a trusted publishers for more details.
Version v8.2#
New Features:
Added a new action named
ansys/actions/hk-automerge-prs. This action allows maintainers to auto-approve and mergedependabotPRs andpre-commit.ciPRs. It is recommended to add the action at the end of the workflow, once all the stages have finished successfully. That way, in case a repository has failing stages, it is not run. This action will run in case the PR has been created bydependabotorpre-commit.ci. You can see an example of its implementation here and the associated PR/commit.Added a new input parameter
use-ansys-default-templateto theansys/actions/doc-changelogaction. This input allows users to utilize the default template provided by theansys/actionsrepository. For migration instructions, see the migration steps below.Note
The default template is only available for the
ansys/actions/doc-changelogaction and is in the reStructuredText (rst) format.Added a new input parameter
fail-levelto theansys/actions/doc-styleaction. This input allows users to select the report level used to control check results. Default value is"error"but it can be changed to"any","info","warning", or"error".The
release-github/action.ymlaction has been improved with the ability to extend a Github release note with instructions on how to verify the release’s artifacts attestations with Github’s command-line tool.Added a new input
attest-provenanceto theansys/actions/build-libraryandansys/actions/build-wheelhouseactions. Note that adding provenance attestations requires write permissions for id-token and attestation. For example:build-library: name: Build library runs-on: ubuntu-latest permissions: attestations: write contents: read id-token: write steps: - name: "Build library source and wheel artifacts" uses: ansys/actions/build-library@v8 with: library-name: ${{ env.PACKAGE_NAME }} python-version: ${{ env.MAIN_PYTHON_VERSION }} attest-provenance: true
Added two inputs to the
release-github/action.ymlaction. The first input parameteradd-artifact-attestation-notesallows users to add artifact attestation notes to the Github release notes. The second input parametergenerate_release_notesallows users to deactivate the notes automatically generated by default.
Added a new input parameter
randomizeto theansys/actions/tests-pytestaction to randomize the order of the tests.
Migration Steps:
The default documentation includes tabs and tab items, providing a clean changelog reStructuredText (rst) file. To use this feature, add
sphinx-designas a dependency in yourpyproject.tomlfile and includesphinx_designas an extension in yourconf.pyfile.[project.optional-dependencies] doc = [ "sphinx-design", ]
In your
conf.pyfile, add the following line:extensions = [ "sphinx_design", ]
After updating the actions to v9, a comment is made in the PR with the changelog file, suggesting to add sphinx-design as a dependency.
You can ignore that comment if you have already added the dependency.
After merging the PR, the changelog file updates with the new template, and the new release changelog is created using the new template.
Version v8#
Breaking changes:
Use secrets for commit and push credentials within
ansys/actions/doc-changelog,ansys/actions/doc-deploy-changelog,ansys/actions/doc-deploy-dev, andansys/actions/doc-deploy-stable.The token input is required in the
ansys/actions/release-githubaction.
Deprecated features:
The
ansys/actions/doc-deploy-indexaction has been deprecated and will be removed in the next release. With the deprecation ofpymeilisearchand the adoption of a static search index via theansys-sphinx-theme, theansys/actions/doc-deploy-indexaction is no longer necessary.The
ansys/actions/commit-styleaction has been renamed toansys/actions/check-pr-title.The
ansys/actions/branch-name-styleactions has been removed in favor of GitHub rulesets.
Migration steps:
Add the following required inputs to
ansys/actions/doc-changelog,ansys/actions/doc-deploy-changelog,ansys/actions/doc-deploy-dev, andansys/actions/doc-deploy-stable:
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
Add the permissions and token to the
ansys/actions/release-githubaction as follows:
release-github:
name: "Release to GitHub"
runs-on: ubuntu-latest
needs: [build-library]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
permissions:
contents: write
steps:
- name: "Release to GitHub"
uses: ansys/actions/release-github@{{ version }}
with:
library-name: "ansys-<product>-<library>"
token: ${{ secrets.GITHUB_TOKEN }}
Version v7#
New features:
Added an optional input to the
ansys/actions/build-libraryaction to disable library build validation on demand using thevalidate-build: falseargument. This is useful when you want to skip the library build validation step in the action.Incorporated the usage of Trusted Publisher in the
ansys/actions/release-pypi-*actions. This is useful when you want to sign the package before uploading it to PyPI.
Migration steps:
To set up your repository to use the
ansys/actions/release-pypi-*action with the Trusted Publisher approach, see the Release to PyPI as a trusted publishers.
Version v6#
New features:
Added the
ansys/actions/check-vulnerabilitiesaction to check for third-party and first-party vulnerabilities. This is useful when you want to hide the vulnerabilities from the logs, but still want to fail the action if vulnerabilities are found.Avoid creating issues by default if vulnerabilities are found in the
ansys/actions/check-vulnerabilitiesaction.Create a changelog fragment file for each pull request using
towncrierin theansys/actions/doc-changelogaction.Generate a new section in
CHANGELOG.mdif fragment files exist usingtowncrierin theansys/actions/doc-deploy-changelogaction. By default, it updates the CHANGELOG in the release branch and creates a pull request into the main branch with the updated CHANGELOG and deleted fragment files.SEO improvements. These are implemented inside the doc-deploy-dev and the doc-deploy-stable. Users are not required to apply any changes to their
conf.pyor.github/workflows/*.ymlfiles. Noticable changes include:No more redirect from landing page to version/stable/index.html
Generation of
robots.txtfile for avoiding indexing old documentation versionsGeneration of sitemap.xml file for quicker indexing of version/stable/ pages
Inclusion of canonical link tags in all HTML files for SEO purposes
Extend
ansys/actions/doc-buildto be able to run in Windows runners. To buid the documentation in a Windows runner, we installChocolateyandMiktex.Allow
ansys/actions/commit-styleto work with upper case in the type field of a commit. Expected types are upper cases of conventional commit types.
Breaking changes:
Upgrade default
valeversion from2.29.6to3.4.1inansys/actions/doc-styleaction.Vale configuration file
.vale.iniandVocab/ANSYShas to be changed.
Migration steps:
To set up your repository to use the
ansys/actions/doc-changelogaction, see the Doc-changelog action setup.To set up your repository to use the
ansys/actions/doc-deploy-changelogaction, see the Doc-deploy-changelog action setup.To set up your repository to use the
ansys/actions/doc-styleaction, see the Doc-style action - migrating from Vale 2.X to 3.X.
Version v5#
New features:
Added
ansys/action/check-vulnerabilitiesto verify third party and first party vulnerabilities. This action usesbanditandsafetyto detect vulnerabilities in the code and dependencies, respectively.Added
ansys/actions/docker-styleto detect Dockerfile style issues usinghadolint.Allow
valeversion input inansys/actions/doc-styleaction. By default,2.29.6is used.Allow using the twine
--skip-existingflag in theansys/actions/release-pypi-*actions.Allow using the
ansys/actions/doc-buildaction to build documentation using a dedicated requirements file (and consequently, no need to have a Python project to use it).Allow for independent documentation releases in case of patch release when using
ansys/actions/doc-deploy-stableaction. This will create independent documentation versions for patch releases.
Breaking changes:
Upgrade
actions/upload-artifactandactions/download-artifactto versionv4.Upgrade
actions/setup-pythonto versionv5.
Migration steps:
Since artifacts are uploaded/downloaded using the new
actions/*-artifact, artifact names cannot be duplicated inside the workflow. Also, versionsv3andv4are incompatible with each other. If you are using versionv3independently inside your workflow, you need to upgrade to versionv4.The upgrade to
actions/setup-pythonversionv5is not mandatory, but it is recommended to use the latest version. However, it has been seen that in Windows self-hosted runners, if a certain Python version is not already stored in the cache, the action fails. This is a known issue and the workaround is to use the previous version of the action.
Dependency changes:
Upgrade
actions/checkoutto versionv4.Upgrade
pypa/cibuildwheelto versionv2.16.2.Upgrade
peter-evans/create-or-update-commentto versionv4.Upgrade
vimtor/action-zipto versionv1.2.
Version v4#
Breaking changes:
Multi-version documentation deployment using
ansys/actions/doc-deploy-stableandansys/actions/doc-deploy-dev.
Migration steps:
Visit Enable multi-version documentation for a detailed migration guide.