mirror of
https://github.com/Heretek-AI/heretek-actions.git
synced 2026-10-12 02:03:46 +00:00
Complete implementation of all 7 phases: Phase 1: Foundation - Repository directory structure - .agent/schema.json — Standard JSON envelope schema - .github/CODEOWNERS, LICENSE (MIT), .gitignore - README.md shell Phase 2: Agent-Facing Actions (5 composite actions) - agent-context — Scans repo, detects stack, queries GitHub API - pr-summary — Analyzes PR diff, categorizes files, links issues - issue-triage — Classifies, labels, detects duplicates - check-status — Watches CI checks, produces merged status - review — Lightweight structural code analysis - Shared agent-envelope.sh helper for standardized .agent/output.json Phase 3: Pre-commit Hooks - .pre-commit-config.yaml — Universal hook config - pre-commit-ci.yml — CI workflow running pre-commit Phase 4: CI Composite Actions - rust-ci — fmt, clippy, test, coverage (opt), audit (opt) - js-ci — lint, typecheck, test (npm/pnpm/yarn/bun) - python-ci — lint (ruff), typecheck (mypy), test (pytest) Phase 5: Universal CI Orchestrator - check.yml — Auto-detects languages, routes to CI actions Phase 6: Universal Release - release action — Docker, Flatpak, npm, GitHub releases - release.yml — workflow_call reusable workflow Phase 7: Documentation - Full README with quick start, per-action docs, agent integration guide Co-Authored-By: Claude <[email protected]>
123 lines
3.6 KiB
YAML
123 lines
3.6 KiB
YAML
name: "Universal Release"
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
release-type:
|
|
description: "Release target: docker, flatpak, npm, github-release"
|
|
type: string
|
|
required: true
|
|
version:
|
|
description: "Semver version (e.g., v1.2.3)"
|
|
type: string
|
|
required: true
|
|
dockerfile:
|
|
description: "Path to Dockerfile (docker type)"
|
|
type: string
|
|
default: "./Dockerfile"
|
|
required: false
|
|
docker-image-name:
|
|
description: "Docker image name (docker type)"
|
|
type: string
|
|
default: ""
|
|
required: false
|
|
docker-platforms:
|
|
description: "Comma-separated platforms (docker type)"
|
|
type: string
|
|
default: "linux/amd64,linux/arm64"
|
|
required: false
|
|
flatpak-manifest:
|
|
description: "Path to Flatpak manifest (flatpak type)"
|
|
type: string
|
|
default: ""
|
|
required: false
|
|
flatpak-branch:
|
|
description: "Flatpak branch (flatpak type)"
|
|
type: string
|
|
default: "stable"
|
|
required: false
|
|
npm-dry-run:
|
|
description: "Dry run for npm publish"
|
|
type: string
|
|
default: "false"
|
|
required: false
|
|
release-notes:
|
|
description: "Custom release notes"
|
|
type: string
|
|
default: ""
|
|
required: false
|
|
generate-notes:
|
|
description: "Auto-generate release notes from commits"
|
|
type: string
|
|
default: "true"
|
|
required: false
|
|
prerelease:
|
|
description: "Mark as prerelease"
|
|
type: string
|
|
default: "false"
|
|
required: false
|
|
make-latest:
|
|
description: "Mark as latest release"
|
|
type: string
|
|
default: "true"
|
|
required: false
|
|
assets:
|
|
description: "JSON array of asset paths ({name, path} format)"
|
|
type: string
|
|
default: "[]"
|
|
required: false
|
|
|
|
secrets:
|
|
github-token:
|
|
description: "GitHub token"
|
|
required: false
|
|
npm-token:
|
|
description: "npm token (for npm releases)"
|
|
required: false
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: "0"
|
|
|
|
- name: "QEMU Setup (Docker)"
|
|
if: inputs.release-type == 'docker'
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: "Docker Buildx Setup (Docker)"
|
|
if: inputs.release-type == 'docker'
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: "Docker Login"
|
|
if: inputs.release-type == 'docker'
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.github-token || secrets.GITHUB_TOKEN }}
|
|
|
|
- name: "Run Release"
|
|
uses: Heretek-AI/heretek-actions/.github/actions/release@v1
|
|
with:
|
|
release-type: ${{ inputs.release-type }}
|
|
version: ${{ inputs.version }}
|
|
github-token: ${{ secrets.github-token || secrets.GITHUB_TOKEN }}
|
|
dockerfile: ${{ inputs.dockerfile }}
|
|
docker-image-name: ${{ inputs.docker-image-name || github.repository }}
|
|
docker-platforms: ${{ inputs.docker-platforms }}
|
|
flatpak-manifest: ${{ inputs.flatpak-manifest }}
|
|
flatpak-branch: ${{ inputs.flatpak-branch }}
|
|
npm-token: ${{ secrets.npm-token }}
|
|
npm-dry-run: ${{ inputs.npm-dry-run }}
|
|
release-notes: ${{ inputs.release-notes }}
|
|
generate-notes: ${{ inputs.generate-notes }}
|
|
prerelease: ${{ inputs.prerelease }}
|
|
make-latest: ${{ inputs.make-latest }}
|
|
assets: ${{ inputs.assets }}
|