Skip to content

SECURITY-11480: update actions #14

SECURITY-11480: update actions

SECURITY-11480: update actions #14

Workflow file for this run

name: Python
on:
push:
branches: [ master ]
tags:
- 'v*'
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install -e .[dev]
- name: Test with pytest
run: python -m unittest discover test 'test_*.py'
- name: Build package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.python-version == '3.9'
run: python -m build
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.python-version == '3.9'
uses: pypa/gh-action-pypi-publish@v1.14.0
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}