Skip to content

Model Release

Model Release #3

Workflow file for this run

name: Model Release
on:
push:
tags:
- "v*"
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Tag to release (e.g. v1.2.3)"
required: true
env:
FORCE_COLOR: "1"
RELEASE_TAG: ${{ github.ref_name || github.event.inputs.tag }}
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write # Required to create GitHub Releases and upload assets
steps:
- name: Checkout repository
uses: actions/checkout@v7.0.1
with:
fetch-depth: 0 # Required for uv-dynamic-versioning to read git tags
persist-credentials: false
submodules: 'recursive' # grab submodules
- name: Set up uv
uses: astral-sh/setup-uv@v10.0.1
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v7.0.0
with:
python-version: "3.10"
- name: Install just
run: uv tool install rust-just
# Install gen-sqla before uv sync so the hatch build hook can find it
# when building the editable install during `uv sync --no-install-project`.
- name: Install gen-sqla
run: uv tool install linkml
- name: Install dependencies
run: uv sync --dev --no-progress --no-install-project
- name: Install project
run: uv sync --dev --no-progress
- name: Generate all model artifacts
run: |
just site
# Runs gen-project, gen-doc, _gen_ftddd, _gen_sqla, _gen_harmony
# Produces: project/sqlalchemy/, project/harmony/, project/owl/, etc.
# hatch_build.py will skip re-generating the SQLAlchemy file since
# just site already created it (dest_file.exists() guard).
- name: Build wheel and sdist
run: uv build
- name: Zip full project artifacts
run: zip -r project-artifacts.zip project/
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ env.RELEASE_TAG }}
name: "Release ${{ env.RELEASE_TAG }}"
generate_release_notes: true
update_release: true
files: |
dist/*.whl
dist/*.tar.gz
project-artifacts.zip
fail_on_unmatched_files: true