Skip to content

MAINT: Bump softprops/action-gh-release from 2.3.3 to 2.4.1 in the actions-deps group #600

MAINT: Bump softprops/action-gh-release from 2.3.3 to 2.4.1 in the actions-deps group

MAINT: Bump softprops/action-gh-release from 2.3.3 to 2.4.1 in the actions-deps group #600

Workflow file for this run

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.11'
jobs:
build:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
- name: Run protolint
uses: plexsystems/protolint-action@7838989df3edefc91ea9370aadd5225e6bb73836 # v0.7.0
with:
configDirectory: .
- name: Install build requirements
run: |
pip install -U pip
pip install build
- name: Build
run: python -m build
- name: Install
run: pip install dist/*.whl
- name: Test import
run: |
mkdir tmp
cd tmp
python -c "import ansys.api.geometry.v0; print('Successfully imported ansys.api.geometry.v0')"
python -c "from ansys.api.geometry import __version__; print(__version__)"
- name: Upload packages
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ansys-api-geometry-artifacts
path: dist/
retention-days: 7
release:
name: Release package to GitHub
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
needs: [build]
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
id-token: write
contents: write
steps:
- name: "Download the library artifacts from build-library step"
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
name: ansys-api-geometry-artifacts
path: ansys-api-geometry-artifacts
- name: Release
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
with:
generate_release_notes: true
files: |
./**/*.whl
./**/*.tar.gz
release-pypi:
name: Release project to PyPI
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
needs: [build]
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
id-token: write
contents: write
steps:
- name: "Download the library artifacts from build-library step"
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
name: ansys-api-geometry-artifacts
path: ansys-api-geometry-artifacts
- name: "Upload artifacts 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: ansys-api-geometry-artifacts
skip-existing: false