TsukiNi22/ai-utils / skills/git/ci-cd
ci-cd
VerifiedCI and CD of a GitHub repository in Tsukini's way - the CI (build check, unit tests, style check with xstyle, coverage) and the CD (GitHub releases from the CHANGELOG, RPM/DEB packages and their gh-pages repository, container images on ghcr.io, PyPI, docs on gh-pages, dispatch to other repositories), always asking first what to run, runs the jobs in the user's Docker images (ghcr.io/tsukini22 ci / unit-tests / package / git from the docker-image repository) or else the smallest official image that has what is needed, follows his conventions (names, vars.RUNNER, ccache, set -euo pipefail, annotations, dispatch keywords), and when one of his images misses a tool, adds it to the docker-image repository (Dockerfile, version, CHANGELOG, README) with a local commit only. Used by the project setup skills (cpp-project, python-project) when the project is a GitHub repository. Use whenever the user wants a CI, a CD, a release / deployment / publication pipeline, a GitHub workflow / action, or to change one.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.8 KB |
| requires.txt | markdown | 16 B |
| scripts/check_workflows.pyexecutable | script | 5.1 KB |
| templates/container.yml | config | 1.7 KB |
| templates/dispatch-repository.yml | config | 877 B |
| templates/pypi.yml | config | 885 B |
| templates/python.yml | config | 984 B |
| templates/release.yml | config | 1.6 KB |
| templates/style.yml | config | 1.2 KB |
templates/release.yml
View on GitHubname: Release - GitHub (CD)
on:
push:
tags: ['v*']
permissions:
contents: write
jobs:
release:
runs-on: ${{ vars.RUNNER }}
defaults:
run:
shell: bash
container:
image: ghcr.io/tsukini22/git:latest # git / wget, gh installed below only if missing
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Release notes (section of the tag in CHANGELOG.md)
run: |
set -euo pipefail
# CHANGELOG sections (git-conventions): '## vX.Y.Z - YYYY-MM-DD' (stable) / '## [vX.Y.Z-pre] - YYYY-MM-DD' (pre-release)
awk -v tag="$GITHUB_REF_NAME" '
BEGIN {gsub(/\./, "\\.", tag)}
$0 ~ "^## \\[?" tag "\\]?( |$)" {found = 1; next}
found && /^## / {exit}
found {print}
' CHANGELOG.md > notes.md
if [ ! -s notes.md ]; then
echo "::error title=Release notes,file=CHANGELOG.md::no section '## $GITHUB_REF_NAME - <date>' in CHANGELOG.md"
exit 1
fi
echo "✓ notes of $GITHUB_REF_NAME ok"
- name: Create the GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
command -v gh > /dev/null || dnf install -y gh
git config --global --add safe.directory "$GITHUB_WORKSPACE"
prerelease=()
case "$GITHUB_REF_NAME" in *-*) prerelease=(--prerelease) ;; esac
gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --notes-file notes.md "${prerelease[@]}" {{ASSETS}}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |