Skip to content

Build anyhost distribution based on managed code #3

Build anyhost distribution based on managed code

Build anyhost distribution based on managed code #3

name: Build and Publish

Check failure on line 1 in .github/workflows/build-and-publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-and-publish.yml

Invalid workflow file

(Line: 18, Col: 13): Unexpected value 'ubuntu-latest'
permissions:
id-token: write
contents: read
on:
workflow_dispatch:
release:
types: [created]
jobs:
build-and-publish:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ubuntu-latest
python-version: ["3.11"]
steps:
- name: Checkout repo with submodules
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
persist-credentials: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Sync and update FracturedJson submodule
shell: bash
run: |
set -euo pipefail
git submodule sync --recursive
git submodule update --init --recursive
pushd FracturedJson
git fetch --no-tags origin main
git checkout -B main origin/main
git reset --hard origin/main
popd
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --locked --all-extras --dev
- name: Build FracturedJson binaries
run: uv run python3 src/build/build_binaries.py
- name: Run tests
run: uv run pytest
- name: Build distribution
run: uv build
- name: Publish to PyPI
run: uv publish