Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable validate-build option to build-library action #473

Merged
merged 2 commits into from
Apr 25, 2024
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
17 changes: 15 additions & 2 deletions build-library/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ inputs:
Whether to use the Python cache for installing previously downloaded
libraries. If ``true``, previously downloaded libraries are installed from the
Python cache. If ``false``, libraries are downloaded from the PyPI index.
required: false
default: true
type: boolean

validate-build:
description: >
Whether to validate the build process. If ``true``, the build process is
validated. If ``false``, the build process is not validated.
required: false
default: true
type: boolean
Expand All @@ -83,10 +90,16 @@ runs:
run: |
python -m pip install build twine

- name: "Build distribution artifacts and check their health"
- name: "Build distribution artifacts"
shell: bash
run: |
python -m build

- name: "Check build health"
shell: bash
if: inputs.validate-build == 'true'
run: |
python -m build && python -m twine check dist/*
python -m twine check dist/*

- name: "Upload distribution artifacts to GitHub artifacts"
uses: actions/upload-artifact@v4
Expand Down
4 changes: 4 additions & 0 deletions doc/source/migrations/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Development version

**New features:**

- Added an optional input to the ``ansys/actions/build-library`` action to disable library build
validation on demand using the ``validate-build: false`` argument. This is useful when you want to
skip the library build validation step in the action.

**Breaking changes:**

**Migration steps:**
Expand Down
8 changes: 5 additions & 3 deletions doc/styles/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
!**/ANSYS/accept.txt
!**/ANSYS/reject.txt
*
!config
!config/vocabularies
!config/vocabularies/ANSYS
!config/vocabularies/ANSYS/**
!.gitignore
Loading