Skip to content

new release

new release #107

Workflow file for this run

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.10']
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
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-latest' }}
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@v3
- name: Set up Python
uses: actions/setup-python@v4
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 }}