Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
70494c7
chore: migrate actions to central repo
JheisonMB Apr 10, 2026
a33adf1
refactor: reduce nesting in linter from 97 to focused functions
JheisonMB May 7, 2026
01eaaba
refactor: reduce nesting in diagrams from 44 to focused functions
JheisonMB May 7, 2026
7cfeff6
fix: improve diagram rendering quality and layout preservation
JheisonMB May 7, 2026
e6d80bd
fix: point template registry to UniverLab org
JheisonMB Jun 12, 2026
e082553
feat: improve diagram pipeline and restore Windows support
JheisonMB Jun 12, 2026
07f9d7e
feat: add D2 diagram support
JheisonMB Jun 12, 2026
18200eb
feat(fmt): nesting-aware LaTeX indentation and BibTeX formatting
JheisonMB Jun 12, 2026
fcb41bc
feat(template): list remote registry by default
JheisonMB Jun 12, 2026
02256bf
feat(new): substitute template placeholders during project generation
JheisonMB Jun 12, 2026
390c31c
chore: apply cargo fmt
JheisonMB Jun 12, 2026
2a4c35c
Merge pull request #15 from UniverLab/fix/diagram-generation
JheisonMB Jun 12, 2026
aebb075
Merge pull request #16 from UniverLab/feat/d2-diagrams
JheisonMB Jun 12, 2026
ec94f9d
docs: add docs folder and align readme with univerlab system
JheisonMB Jun 12, 2026
dabc350
refactor!: rename project.toml keys and embedded template to english
JheisonMB Jun 12, 2026
ac517f1
docs: add automated demo recording and regenerate gif
JheisonMB Jun 12, 2026
876586a
feat: install the texforge agent skill from the install scripts
JheisonMB Jun 14, 2026
ee13bf7
chore: move demo recording scripts to the workspace scripts folder
JheisonMB Jun 14, 2026
fe22557
chore: ignore mp4 binaries and remove legacy demo gifs from assets
JheisonMB Jun 25, 2026
ddaa6ba
docs: add texforge demo recording
JheisonMB Jun 25, 2026
7341f6a
chore(demo): update recorded demo assets
JheisonMB Jun 25, 2026
6441082
refactor: flatten check_diagram_pos_option, parse_bib_keys, extract p…
JheisonMB Jun 28, 2026
a7faeb5
feat(install): verify SHA256 checksum of downloaded archive
JheisonMB Jul 1, 2026
81d4f11
docs(demo): update demo assets and README to use new OpenCode demo
JheisonMB Jul 7, 2026
a786554
chore: add .mimocode/ to gitignore
JheisonMB Jul 9, 2026
c0e9cc0
Merge pull request #17 from UniverLab/docs/initial-docs
JheisonMB Jul 10, 2026
08af154
chore: ignore .mp4 and .mimocode
JheisonMB Jul 10, 2026
f637caa
chore: bump version to 0.7.0, fix d2-little yanked dep
JheisonMB Jul 10, 2026
6ee8eca
Merge branch 'develop' into chore/fix-ci
JheisonMB Jul 10, 2026
612c21a
Merge pull request #20 from UniverLab/chore/fix-ci
JheisonMB Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 3 additions & 102 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,107 +2,8 @@ name: CI

on:
pull_request:
branches:
- develop
- main

permissions:
contents: read
pull-requests: write

env:
CARGO_TERM_COLOR: always
workflow_dispatch:

jobs:
check:
name: Check, Test & Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- name: Cargo fmt
run: cargo fmt --check

- name: Cargo build
run: cargo build --release

- name: Cargo test
run: cargo test

- name: Cargo clippy
run: cargo clippy --all-targets -- -D warnings

publish-check:
name: Publish Check (dry-run)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cargo publish dry-run
run: cargo publish --dry-run

# Validaciones adicionales para PRs a main
main-pr-checks:
name: Main PR Requirements
if: github.base_ref == 'main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check version bump
run: |
# Obtener la versión actual
CURRENT_VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
echo "Versión en Cargo.toml: $CURRENT_VERSION"

# Obtener el último tag
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
if [ -z "$LAST_TAG" ]; then
echo "✅ Primer release (no hay tags previos)"
else
LAST_VERSION=${LAST_TAG#v}
echo "Última versión en tag: $LAST_VERSION"
if [ "$CURRENT_VERSION" = "$LAST_VERSION" ]; then
echo "❌ Error: La versión en Cargo.toml debe bumpearse en PR a main"
echo "Cambio requerido para PRs a main:"
echo "- develop → main: version DEBE incrementarse"
exit 1
fi
echo "✅ Versión bumpeada correctamente"
fi
rust-ci:
uses: UniverLab/workflows/.github/workflows/rust-ci.yml@main
217 changes: 8 additions & 209 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,219 +2,18 @@ name: Release

on:
pull_request:
branches:
- main
types:
- closed
paths:
- Cargo.toml
branches: [main]
types: [closed]
paths: [Cargo.toml]
workflow_dispatch:

permissions:
contents: write

env:
CARGO_TERM_COLOR: always

jobs:
create-tag:
name: Create Release Tag
release:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.version.outputs.tag }}
version: ${{ steps.version.outputs.version }}
created: ${{ steps.create.outputs.created }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get version from Cargo.toml
id: version
run: |
VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/' | tr -d '\r' | xargs)
TAG="v${VERSION}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT

- name: Check if tag already exists
id: check_tag
run: |
TAG=${{ steps.version.outputs.tag }}
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "exists=true" >> $GITHUB_OUTPUT
echo "Tag $TAG already exists, skipping"
else
echo "exists=false" >> $GITHUB_OUTPUT
fi

- name: Create and push tag
id: create
run: |
if [ "${{ steps.check_tag.outputs.exists }}" = "true" ]; then
echo "created=false" >> $GITHUB_OUTPUT
echo "Tag already exists — skipping release"
exit 0
fi
TAG=${{ steps.version.outputs.tag }}
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a "$TAG" -m "Release $TAG"
git push origin "$TAG"
echo "created=true" >> $GITHUB_OUTPUT
echo "Tag $TAG created and pushed"

build:
name: Build ${{ matrix.target }}
needs: create-tag
if: needs.create-tag.outputs.created == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
archive: tar.gz
- target: aarch64-apple-darwin
os: macos-latest
archive: tar.gz
- target: x86_64-apple-darwin
os: macos-latest
archive: tar.gz
- target: x86_64-pc-windows-msvc
os: windows-latest
archive: zip

steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.create-tag.outputs.tag }}

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Install musl tools (Linux)
if: matrix.target == 'x86_64-unknown-linux-musl'
run: sudo apt-get update && sudo apt-get install -y musl-tools

- name: Build release binary
run: cargo build --release --target ${{ matrix.target }}

- name: Package (unix)
if: matrix.archive == 'tar.gz'
run: |
cd target/${{ matrix.target }}/release
tar czf "../../../texforge-${{ needs.create-tag.outputs.tag }}-${{ matrix.target }}.tar.gz" texforge
cd ../../..

- name: Package (windows)
if: matrix.archive == 'zip'
shell: pwsh
run: |
cd target/${{ matrix.target }}/release
Compress-Archive -Path texforge.exe -DestinationPath "../../../texforge-${{ needs.create-tag.outputs.tag }}-${{ matrix.target }}.zip"
cd ../../..

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: texforge-${{ matrix.target }}
path: texforge-${{ needs.create-tag.outputs.tag }}-${{ matrix.target }}.*

github-release:
name: Create GitHub Release
needs: [create-tag, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true

- name: Create release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.create-tag.outputs.tag }}
generate_release_notes: true
files: artifacts/*

approve:
name: Awaiting Manual Approval
needs: github-release
runs-on: ubuntu-latest
environment:
name: production
steps:
- name: Approval granted
run: echo "Release approved for publishing to crates.io"

ensure-owners:
name: Ensure crates.io owners
needs: create-tag
if: needs.create-tag.outputs.created == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.create-tag.outputs.tag }}

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Add crates.io owners (best-effort)
env:
TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
OWNERS: github:univerlab:owners
run: |
set -eu
if [ -z "$TOKEN" ]; then
echo "No cargo token found in CARGO_REGISTRY_TOKEN; skipping owners update"
exit 0
fi
CRATE_NAME=$(grep '^name = ' Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/' | tr -d '\r')
echo "crate=$CRATE_NAME"
for owner in $(echo "$OWNERS" | tr ',' ' '); do
echo "Adding owner: $owner"
cargo owner --token "$TOKEN" --add "$owner" || echo "cargo owner failed for $owner (continuing)"
done

publish:
name: Publish to crates.io
needs: [create-tag, approve, ensure-owners]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.create-tag.outputs.tag }}

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Check if stable release
id: version_check
run: |
VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/' | xargs)
if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "is_stable=true" >> $GITHUB_OUTPUT
echo "Version $VERSION is stable — will publish"
else
echo "is_stable=false" >> $GITHUB_OUTPUT
echo "Version $VERSION is prerelease/dev — skipping publish"
fi

- name: Cargo publish
if: steps.version_check.outputs.is_stable == 'true'
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --allow-dirty

- name: Skipped prerelease
if: steps.version_check.outputs.is_stable == 'false'
run: echo "⏭️ Skipped crates.io publish for prerelease version"
uses: UniverLab/workflows/.github/workflows/rust-release.yml@main
with:
binary-name: texforge
secrets: inherit
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,12 @@ target/
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# Large video files
*.mp4

# AI agent workspaces
.mimocode/

# End of https://www.toptal.com/developers/gitignore/api/rust

.mimocode/
Loading
Loading