fix: enable empty Or #14
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
# Code generated by internal/ci/github/ci_tool.cue; DO NOT EDIT. | |
name: release | |
"on": | |
push: | |
branches: | |
- main | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+ | |
pull_request: null | |
merge_group: null | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
env: | |
MINIMUM_PYTHON_VERSION: "3.9" | |
UV_VERSION: 0.5.15 | |
jobs: | |
build: | |
name: ubuntu / 3.9 / build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up the environment | |
uses: actions/setup-python@v5 | |
id: setup-python | |
with: | |
python-version: ${{ env.MINIMUM_PYTHON_VERSION }} | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: ${{ env.UV_VERSION }} | |
enable-cache: true | |
- name: Build distribution | |
run: make build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pypi_files | |
path: dist | |
test-build: | |
name: ${{ matrix.os }} / 3.9 / test built artifact | |
needs: | |
- build | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu | |
- macos | |
- windows | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MINIMUM_PYTHON_VERSION }} | |
- name: get dist artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: pypi_files | |
path: dist | |
- run: rm -r src | |
- run: pip install typing-extensions | |
- run: pip install -r tests/requirements-testing.lock | |
- run: pip install karp-api-client --no-index --no-deps --find-links dist --force-reinstall | |
- run: pytest | |
release-check: | |
if: always() | |
needs: | |
- build | |
- test-build | |
runs-on: ubuntu-latest | |
permissions: {} | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} | |
publish: | |
needs: | |
- test-build | |
if: success() && startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ env.MINIMUM_PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MINIMUM_PYTHON_VERSION }} | |
- name: get dist artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: pypi_files | |
path: dist | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |