Skip to content

Release Minor Package by @sunnywu #25

Release Minor Package by @sunnywu

Release Minor Package by @sunnywu #25

name: Build and Publish PyPi Packages
run-name: ${{ format('Release {0}', inputs.release_type)}} Package by @${{ github.actor }}
on:
workflow_dispatch:
inputs:
release_type:
type: choice
description: The type of release
options:
- Major
- Minor
- Patch
publish_vulnerabilities:
type: string
default: "true"
vulnerability_failure_severity:
description: The severity to fail the workflow if such vulnerability is detected. DO NOT override it unless a Jira ticket is raised. Must be one of ['CRITICAL', 'CRITICAL,HIGH' or 'CRITICAL,HIGH,MEDIUM'] (without space in between).
type: string
default: 'CRITICAL,HIGH'
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10","3.11","3.12","3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Run unit tests
run: |
python -m unittest tests/*.py
build-and-pubish:
name: Build and publish Python packages to PyPi
needs: unit-tests
uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-pypi-versioned.yaml@v3
with:
release_type: ${{ inputs.release_type }}
publish_vulnerabilities: ${{ inputs.publish_vulnerabilities }}
vulnerability_failure_severity: ${{ inputs.vulnerability_failure_severity }}
secrets: inherit