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
32 changes: 25 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ jobs:
upload-reports: True
hide-log: false


docs-build:
name: "Build documentation"
needs: doc-style
Expand All @@ -142,6 +143,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}


build-test-remote-matrix:
name: "Build remote test matrix"
runs-on: ubuntu-22.04
Expand All @@ -161,6 +163,7 @@ jobs:
local: false
run_all_builds: ${{ inputs.run_all_builds }}


build-test-remote:
name: "Remote: ${{ matrix.mapdl-version }}"
needs: [smoke-tests, build-test-remote-matrix]
Expand All @@ -177,6 +180,7 @@ jobs:
mapdl-version: "${{ matrix.mapdl-version }}"
file-name: "${{ matrix.mapdl-version }}-remote"


build-test-local-matrix:
name: "Build test matrix for minimal and local"
runs-on: ubuntu-22.04
Expand All @@ -195,6 +199,7 @@ jobs:
local: true
run_all_builds: ${{ inputs.run_all_builds }}


build-test-ubuntu-local:
name: "Local: ${{ matrix.mapdl-version }}"
if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
Expand All @@ -216,6 +221,7 @@ jobs:
tags: "local"
latest-version: "252"


build-test-ubuntu-minimal:
name: "Local-min: ${{ matrix.mapdl-version }}"
if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
Expand All @@ -238,6 +244,7 @@ jobs:
tags: "local,minimal"
latest-version: "252"


build-test-ubuntu-console:
name: "Local-min-console: ${{ matrix.mapdl-version }}"
if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
Expand All @@ -261,6 +268,7 @@ jobs:
file-name: "${{ matrix.mapdl-version }}-minimal-console"
tags: "local,minimal,console"


test-windows:
# Skipped
if: github.repository == ''
Expand Down Expand Up @@ -301,10 +309,22 @@ jobs:
id-token: write
contents: write
steps:
- name: "Release to the public PyPI repository"
uses: ansys/actions/release-pypi-public@v9
- name: "Download the library artifacts from build-library step"
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
with:
library-name: ${{ env.PACKAGE_NAME }}
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@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
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@v9
Expand All @@ -313,9 +333,6 @@ jobs:
additional-artifacts: "minimum_requirements.txt"
token: ${{ secrets.GITHUB_TOKEN }}

- name: "Display structure of downloaded files"
run: ls -Rla


upload-docs-release:
name: "Upload release documentation"
Expand Down Expand Up @@ -380,6 +397,7 @@ jobs:
with:
julia-version: ${{ matrix.julia-version }}


pytest-summary:
name: Pytest summary for all the test jobs
needs: [
Expand All @@ -394,4 +412,4 @@ jobs:
- name: "Run Pytest-summary action"
uses: ./.github/actions/pytest-summary
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
1 change: 1 addition & 0 deletions doc/changelog.d/3837.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feat: update CI workflow to release to PyPI using trusted publisher