Fix the semantic release #192
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: Python API CLient | |
on: push | |
jobs: | |
test: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install requirements | |
run: pip install tox twine -r requirements.txt -r test-requirements.txt | |
# Open-api-generator is broken. To be updated when upgrading | |
# - name: test | |
# run: tox | |
- name: Check Readme syntax | |
run: | | |
python setup.py sdist | |
twine check dist/* | |
# taken from https://python-semantic-release.readthedocs.io/en/latest/migrating_from_v7.html | |
release: | |
runs-on: self-hosted | |
needs: test | |
if: contains(' | |
refs/heads/master | |
refs/heads/main' | |
, github.ref) | |
concurrency: release | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install ci requirements | |
run: pip install -r ci-requirements.txt | |
- name: Release | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GA" | |
PYTHONPATH=$PWD python setup.py sdist | |
PYTHONPATH=$PWD semantic-release version | |
PYTHONPATH=$PWD twine upload --non-interactive dist/* | |
PYTHONPATH=$PWD semantic-release publish | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} |