fix #196
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: Release | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- '*' | |
workflow_dispatch: | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
# from https://docs.pypi.org/trusted-publishers/using-a-publisher/ | |
# Specifying a GitHub environment is optional, but strongly encouraged | |
environment: release | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install build dependencies | |
run: python -m pip install -U setuptools wheel build | |
- name: Build | |
run: python -m build . | |
- name: Run python tests | |
run: | | |
python setup.py egg_info | |
pip install -r requirements-tests.txt | |
python -m unittest tests/test_api_client.py | |
- name: Publish | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
skip-existing: true |