chore: regenerate service (sdk) (#11) #36
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: Waylay Registry CI | |
on: | |
push: | |
branches: [ "main", "staging", "release/**" ] | |
tags: | |
- '**' | |
pull_request: | |
branches: [ "main", "staging", "release/**" ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Git with token to access other private repositories | |
run: git config --global url."https://${{ secrets.OTOMATOR_PAT }}@github".insteadOf https://github | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: '**/*requirements*.txt' | |
- name: install dependencies | |
run: make ci-install-types | |
- name: code qa | |
run: make ci-code-qa | |
- name: unit tests | |
run: make ci-test | |
test-minimal: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Git with token to access other private repositories | |
run: git config --global url."https://${{ secrets.OTOMATOR_PAT }}@github".insteadOf https://github | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: '**/*requirements*.txt' | |
- name: install dependencies | |
run: make ci-install-api | |
- name: unit tests | |
run: make ci-test | |
publish-api: | |
needs: | |
- test | |
- test-minimal | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
defaults: | |
run: | |
working-directory: ./waylay-sdk-registry | |
name: Publish api package to PyPI | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/waylay-sdk-registry | |
permissions: | |
actions: read | |
contents: read | |
id-token: write # IMPORTANT: mandatory for trusted publishing | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install pypa/build | |
run: pip install build | |
- name: check version | |
id: check-tag | |
uses: samuelcolvin/[email protected] | |
with: | |
version_file_path: waylay-sdk-registry/src/waylay/services/registry/service/__init__.py | |
- name: Build | |
run: python3 -m build | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: waylay-sdk-registry/dist | |
publish-types: | |
needs: | |
- test | |
- test-minimal | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
defaults: | |
run: | |
working-directory: ./waylay-sdk-registry-types | |
name: Publish types package to PyPI | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/waylay-sdk-registry-types | |
permissions: | |
actions: read | |
contents: read | |
id-token: write # IMPORTANT: mandatory for trusted publishing | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install pypa/build | |
run: pip install build | |
- name: check version | |
id: check-tag | |
uses: samuelcolvin/[email protected] | |
with: | |
version_file_path: waylay-sdk-registry-types/src/waylay/services/registry/models/__init__.py | |
- name: Build | |
run: python3 -m build | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: waylay-sdk-registry-types/dist |