bugfix release addressing #46 #119
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: publish | |
on: | |
push: | |
tags: '[0-9]+\.*' | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
env: | |
MALSHARE_API: ${{ secrets.MALSHARE_API }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.12'] | |
os: [windows-latest, macos-13, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Linux-specific dependencies | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
sudo apt-get install xclip xvfb | |
- name: MacOS-specific dependencies | |
if: ${{ matrix.os == 'macos-13' }} | |
run: | | |
brew install libmagic | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install flake8 | |
pip install .[all] | |
- name: Unit tests | |
if: ${{ matrix.os != 'ubuntu-latest' }} | |
run: | | |
python -m unittest discover -p test_*.py | |
- name: Unit tests | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
XDG_SESSION_TYPE=x11 xvfb-run python -m unittest discover -p test_*.py | |
deploy: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.7' | |
- name: Build package | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
python -m build --sdist | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |