debug-ci #184
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 | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Debug pwd | |
run: pwd | |
- name: Debug ls | |
run: ls -la | |
- name: Python Semantic Release | |
id: release | |
uses: python-semantic-release/[email protected] | |
with: | |
github_token: ${{ secrets.GH_TOKEN }} | |
root_option: -vv --noop | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true. | |
# See https://github.com/actions/runner/issues/1173 | |
if: steps.release.outputs.released == 'true' |