Update API definition to match backend changes. (#68) #180
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub CI | |
# run only on main branch. This avoids duplicated actions on PRs | |
on: | |
pull_request: | |
push: | |
tags: | |
- "*" | |
branches: | |
- main | |
env: | |
MAIN_PYTHON_VERSION: '3.10' | |
PACKAGE_NAME: 'ansys-api-acp' | |
jobs: | |
build-library: | |
name: "Build package" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Build library source and wheel artifacts" | |
uses: ansys/actions/build-library@v7 | |
with: | |
library-name: ${{ env.PACKAGE_NAME }} | |
pre-commit: | |
name: "Pre-commit checks" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: "Install pre-commit" | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements_dev.txt | |
- name: "Run pre-commit" | |
run: | | |
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) | |
release: | |
name: "Release package" | |
runs-on: ubuntu-latest | |
needs: [build-library] | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | |
steps: | |
- name: "Release to the public PyPI repository" | |
uses: ansys/actions/release-pypi-public@v7 | |
with: | |
library-name: ${{ env.PACKAGE_NAME }} | |
twine-username: "__token__" | |
twine-token: ${{ secrets.PYPI_TOKEN }} | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
generate_release_notes: true | |
files: | | |
./**/*.whl | |
./**/*.tar.gz |