91e75e620b
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Has been cancelled
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Has been cancelled
CD: Docs MCP Server / build (linux/amd64) (push) Has been cancelled
CD: Docs MCP Server / build (linux/arm64) (push) Has been cancelled
CD: Docs MCP Server / merge (push) Has been cancelled
CI: cua-driver distro-compat matrix / Resolve release version (push) Has been cancelled
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Has been cancelled
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Has been cancelled
CI: cua-driver distro-compat matrix / Distro compat summary (push) Has been cancelled
CI: Rust Linux unit / Rust Linux unit and compile (push) Has been cancelled
CI: Rust Windows unit / Rust Windows unit and compile (push) Has been cancelled
CI: Nix Linux Rust source / Nix / compositor build (push) Has been cancelled
CI: Nix Linux Rust source / Nix / driver package (push) Has been cancelled
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Has been cancelled
70 lines
1.8 KiB
YAML
70 lines
1.8 KiB
YAML
name: "CD: cua-train (PyPI)"
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "train-v*"
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: "Version to publish (without v prefix)"
|
|
required: true
|
|
default: "0.1.0"
|
|
workflow_call:
|
|
inputs:
|
|
version:
|
|
description: "Version to publish"
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
prepare:
|
|
runs-on: macos-latest
|
|
outputs:
|
|
version: ${{ steps.get-version.outputs.version }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Determine version
|
|
id: get-version
|
|
run: |
|
|
if [ -n "${{ inputs.version }}" ]; then
|
|
VERSION=${{ inputs.version }}
|
|
elif [ "${{ github.event_name }}" == "push" ]; then
|
|
if [[ "${{ github.ref }}" =~ ^refs/tags/train-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
|
|
VERSION=${BASH_REMATCH[1]}
|
|
else
|
|
echo "Invalid tag format for train"
|
|
exit 1
|
|
fi
|
|
elif [ -n "${{ github.event.inputs.version }}" ]; then
|
|
VERSION=${{ github.event.inputs.version }}
|
|
else
|
|
echo "ERROR: No version found!"
|
|
exit 1
|
|
fi
|
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
|
|
publish:
|
|
needs: prepare
|
|
uses: ./.github/workflows/py-reusable-publish.yml
|
|
with:
|
|
package_name: "train"
|
|
package_dir: "libs/python/cua-train"
|
|
version: ${{ needs.prepare.outputs.version }}
|
|
base_package_name: "cua-train"
|
|
secrets:
|
|
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
|
|
|
create-release:
|
|
needs: [prepare, publish]
|
|
uses: ./.github/workflows/release-github-reusable.yml
|
|
with:
|
|
tag_name: "train-v${{ needs.prepare.outputs.version }}"
|
|
release_name: "cua-train v${{ needs.prepare.outputs.version }}"
|
|
module_path: "libs/python/cua-train"
|
|
body: ""
|