Introducing a new way to review your PRs.

Read the announcement

glincker / thesvg

The open SVG brand library: 7,600+ brand logos and cloud icons (AWS, Azure, GCP) as official SVG. Search, copy, ship via npm, CDN, CLI, React, Vue, Svelte, Figma, VS Code, Raycast and MCP. Free, MIT, no gatekeeping.

View on GitHub

27 documents · Updated Nov 23, 2026

docs / release-and-repository-automation

Release and repository automation

Repository automation protects changes before merge and moves approved changes to user-facing channels. It validates code and assets, manages issue and pull request flow, plans package versions, publishes packages, and sends releases to the site, Homebrew, and the VS Code Marketplace.

Pull request validation

Pull request validation uses change-aware checks so each change receives the right review without running every job for every file. The main check classifies changed areas, runs code checks, runs separate brand and UI icon tests, and builds the site when site inputs change (.github/…/check.yml• L3-18, .github/…/check.yml• L23-65).

The workflow exposes one stable Lint & Build result for branch protection. It treats an intentionally skipped job as successful, but fails when a job that runs fails (.github/…/check.yml• L117-149). Workflow edits use a separate Actionlint check that reports actionlint errors as failures. It runs for pull requests that change .github/workflows/ and cancels older runs for the same pull request (.github/…/actionlint.yml• L3-23). SVG pull requests also get a fast asset check before the wider build. This check validates only changed SVG files and new catalog entries for size, XML shape, unsafe content, icon quality, and catalog structure. It gives quick feedback, but it does not replace the main merge gate (.github/…/validate-svg.yml• L1-18, .github/…/validate-svg.yml• L40-199).

References: .github/…/check.yml• L3-18 .github/…/check.yml• L23-65 .github/…/check.yml• L117-149 .github/…/actionlint.yml• L3-23 .github/…/validate-svg.yml• L1-199

Repository hygiene

Repository hygiene keeps contribution flow clear and limits inactive pull requests. It welcomes new contributors and moves inactive pull requests through stale and close states while preserving exceptions for protected work (.github/…/hygiene.yml• L1-70, .github/…/labeler.yml• L1-23).

Dependabot keeps npm and GitHub Actions dependencies current. Patch and minor updates, development-only updates, and Actions updates can enable auto-merge after CI passes. Production major updates receive a review label and remain manual (.github/dependabot.yml• L1-55, .github/…/dependabot-auto-merge.yml• L1-68). Icon pull requests have a narrower guarded auto-merge path. Icon triage must mark the request ready, required checks must pass, and first-time contributions remain for manual review (.github/…/auto-merge-icon-pr.yml• L1-47).

References: .github/…/hygiene.yml• L1-70 .github/…/labeler.yml• L1-23 .github/labeler.yml• L1-55 .github/dependabot.yml• L1-55 .github/…/dependabot-auto-merge.yml• L1-68 .github/…/auto-merge-icon-pr.yml• L1-47

Supply-chain security

Supply-chain security gives repository automation a separate view of workflow and dependency risk. The scheduled and main-branch Scorecard run publishes a SARIF result and sends it to code scanning while using read-only checkout credentials (.github/…/scorecard.yml• L1-49). This makes security findings visible without joining them to the normal application test gate.

References: .github/…/scorecard.yml• L1-49

SVG asset maintenance

SVG asset maintenance keeps icon files safe and consistent. The fast validation flow checks changed SVGs for valid XML, the required SVG shape, size limits, unsafe content, and icon quality. It also checks catalog entries for unique ordered slugs and required metadata. Exact exceptions exist for approved large flags and archived raster wordmarks (.github/…/validate-svg.yml• L1-18, .github/…/validate-svg.yml• L40-199). The optimization flow applies SVGO cleanup to changed files (.github/…/svgo.yml• L1-24).

Trusted branches and same-repository pull requests receive an automatic optimization commit. Fork pull requests cannot receive a write-back commit, so they fail with a local command when cleanup is needed. The same cleanup runs after the change reaches main (.github/…/svgo.yml• L23-105). Validation decides whether an asset is acceptable. Optimization helps an acceptable asset meet the repository format without requiring every contributor to run the tool locally.

References: .github/…/svgo.yml• L1-105 .github/…/validate-svg.yml• L1-199

Issue triage

Issue triage turns structured icon requests and updates into a consistent state. It reads the issue form, checks the proposed brand data and SVG, finds duplicate slugs, and applies labels and feedback for the next contributor action (.github/…/triage-issue.mjs• L47-60, .github/…/triage-issue.mjs• L195-281, .github/…/triage-icon-issue.yml• L33-127).

The process keeps one generated comment current instead of adding a new bot comment for each edit. Issues that need more information follow an inactivity path. Activity clears the stale state, while icon requests close after 21 days and general information requests close after 28 days (.github/…/stale-icon-issues.yml• L1-29, .github/…/stale-icon-issues.yml• L73-208). See Icon contribution automation for the full icon request and contribution path.

References: .github/…/triage-issue.mjs• L47-60 .github/…/triage-issue.mjs• L103-116 .github/…/triage-issue.mjs• L195-281 .github/…/triage-icon-issue.yml• L1-127 .github/…/stale-icon-issues.yml• L1-208 .github/…/icon_request.yml• L1-88 .github/…/icon_update.yml• L1-49

Package versioning

Package versioning turns changes on main into a reviewable release plan. The version workflow preserves an existing changeset. When none exists, it maps changed package or icon paths to patch releases and includes framework packages that re-export changed icons (.github/…/version.yml• L43-107).

Changesets then opens one chore(release) pull request. A maintainer can merge it by hand. The workflow ignores its own release commit so versioning does not loop (.github/…/version.yml• L11-23, .github/…/version.yml• L127-136).

References: .github/…/version.yml• L1-136 .changeset/config.json• L1-19 package.json• L1-11

Package release

Package release begins when the version pull request reaches main, or when a maintainer manually retries publication. The release lane builds the workspace packages, skips private packages and versions already on npm, then packs and publishes each remaining package with resolved workspace links, registry README metadata, and provenance (.github/…/release.yml• L3-29, .github/…/release.yml• L47-117).

The release lane attempts all eligible packages and reports any failures at the end. After publication, it creates package tags and one combined GitHub release for the version cycle. It also creates a separate CLI release because Homebrew listens for the CLI tag (.github/…/release.yml• L119-155, .github/…/release.yml• L159-287). Detailed package and deployment behavior is covered in Package release and deployment automation.

References: .github/…/release.yml• L1-117 .github/…/release.yml• L119-155 .github/…/release.yml• L159-287 .github/release-body-header.md• L1-19 .changeset/config.json• L1-19

Website deployment

Website deployment turns eligible changes on main into the static GitHub Pages site. It installs the locked workspace, supplies the build-time analytics settings, runs the site build, uploads the result, and deploys it through the Pages environment (.github/…/pages.yml• L1-23, .github/…/pages.yml• L32-96). Documentation-only and repository-maintenance changes do not start the lane, but a manual dispatch can rebuild the site when needed (.github/…/pages.yml• L3-18).

References: .github/…/pages.yml• L1-96 package.json• L5-10

Icon feedback snapshots

Icon feedback snapshots move aggregate vote data from PostHog into the static site without a live browser query. A scheduled job refreshes the data every six hours, reuses one pull request, and lets CI-controlled auto-merge bring a changed snapshot to main; unchanged data creates no pull request (.github/…/icon-stats-snapshot.yml• L1-36, .github/…/icon-stats-snapshot.yml• L85-129, .github/…/auto-merge-icon-stats-pr.yml• L1-41). This keeps the site data current while limiting full site rebuilds.

The job uses a personal access token for checkout, push, and pull request creation. This lets the resulting events start downstream workflows instead of stopping at GitHub's anti-recursion rule for the default token (.github/…/icon-stats-snapshot.yml• L9-21, .github/…/icon-stats-snapshot.yml• L59-70).

References: .github/…/icon-stats-snapshot.yml• L1-36 .github/…/icon-stats-snapshot.yml• L38-129 .github/…/auto-merge-icon-stats-pr.yml• L1-41

Homebrew distribution

Homebrew distribution follows the CLI GitHub release rather than the combined package release. When a release has an @thesvg/cli@... tag, the workflow resolves the CLI version and updates the thesvg formula in the project tap. A manual version input supports operator retries, while a missing tap token causes a safe skip (.github/…/homebrew-tap-update.yml• L1-65).

References: .github/…/homebrew-tap-update.yml• L1-65 .github/…/release.yml• L271-287 packages/…/package.json• L1-47

Extension publishing

The VS Code extension uses a separate release lane because its version and marketplace artifact do not follow the npm package cycle. A change under extensions/vscode/ publishes only when the extension version changes. A manual run can publish the current version, while the first release stays manual (.github/…/vscode-release.yml• L1-41).

When publication is allowed, the lane builds the extension, sends it to the VS Code Marketplace, and creates a version tag. Local package commands also support VS Code and Open VSX publication (.github/…/vscode-release.yml• L43-71, extensions/…/package.json• L61-80).

References: .github/…/vscode-release.yml• L1-71 extensions/…/package.json• L1-80

Automation relationships

The repository uses separate paths for merge safety, package release, site deployment, extension distribution, and icon contribution. Their shared events connect one change to the right destination: a merged version pull request starts npm publication, the CLI release starts Homebrew synchronization, a versioned extension starts Marketplace publication, and a qualifying main change starts Pages deployment.

This diagram shows the main path from review to distribution.

flowchart LR
    Change[Change on a branch] --> Checks[Pull request checks]
    Checks --> Main[Merge to main]
    Main --> Version[Version pull request]
    Version --> Npm[npm publication]
    Npm --> Release[GitHub release and tags]
    Release --> Brew[Homebrew tap update]
    Main --> Pages[GitHub Pages deployment]
    Main --> Extension[Versioned VS Code change]
    Extension --> Marketplace[VS Code Marketplace]
    Stats[PostHog icon feedback] --> Snapshot[Snapshot pull request]
    Snapshot --> Main
    Issue[Structured icon issue] --> Triage[Issue triage]
    Triage --> IconPR[Icon pull request]
    IconPR --> Checks

Icon requests use a parallel path from issue intake to a later pull request. See Icon contribution automation for that path. See Package release and deployment automation for deeper package and deployment detail.

References: .github/…/check.yml• L3-149 .github/…/actionlint.yml• L1-23 .github/…/version.yml• L1-136 .github/…/release.yml• L1-288 .github/…/homebrew-tap-update.yml• L1-65 .github/…/pages.yml• L1-96 .github/…/vscode-release.yml• L1-71 .github/…/triage-icon-issue.yml• L1-127 .github/…/icon-stats-snapshot.yml• L38-129 .github/…/auto-merge-icon-stats-pr.yml• L22-41

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the change classifier, the stable branch-protection check, and the Actionlint path filter aligned. A new path can otherwise miss its required check.
  • Keep icon paths covered by both SVG validation and version mapping. A missing mapping can publish stale framework packages.
  • Keep the icon feedback snapshot branch, pull request trigger, and PAT-based merge path aligned. A token or branch change can stop the snapshot from reaching the site deployment chain.
  • Keep package names, private status, workspace links, changeset links, package tags, and release notes aligned.
  • Keep the release pull request title and publish trigger aligned.
  • Keep the CLI release tag format aligned with the Homebrew release filter.
  • Keep the extension version contract aligned with Marketplace publication. A source change without a version change does not publish.
  • Keep SVG write-back behavior separate for trusted branches and fork pull requests.
  • Keep changed-SVG validation and icons.json slug detection aligned with the paths that trigger the fast asset check. A path or diff rule change can silently skip the intended feedback.
  • Keep the SVG size and raster exceptions aligned with the matching icon validation rules. An exception in one path without the other can block approved assets or allow inconsistent assets.
  • Keep Actionlint's workflow path filter and its error threshold aligned with branch protection. A filter or severity change can allow invalid workflow edits to pass without the intended gate.

Important failure modes

TriggerConsequenceGuard
A workflow path is outside the Actionlint filterInvalid workflow syntax can reach main without its syntax checkActionlint runs for pull requests that change .github/workflows/ (.github/…/actionlint.yml• L3-23)
A changed icon is absent from version mappingRe-exporting packages can keep an old published icon setThe version workflow adds linked framework packages for icon changes (.github/…/version.yml• L59-105)
A changed SVG or new catalog entry misses the fast-check pathMalformed or unsafe asset data reaches the wider validation stage without quick feedbackThe workflow watches icon and catalog paths and validates changed SVGs plus new slugs (.github/…/validate-svg.yml• L12-18, .github/…/validate-svg.yml• L40-199)
A fork pull request contains unoptimized SVG filesAutomation cannot write the cleanup commit to the forkThe workflow reports the local SVGO command and retries optimization after merge (.github/…/svgo.yml• L82-105)
The snapshot job uses the default GitHub tokenThe snapshot pull request cannot trigger or complete downstream automation without manual approvalThe snapshot job uses GH_PAT for checkout, push, and pull request creation (.github/…/icon-stats-snapshot.yml• L59-70, .github/…/icon-stats-snapshot.yml• L115-126)
The version pull request title does not start with chore(release)The publish lane does not start from the merge eventThe publish condition requires a merged release pull request or manual dispatch (.github/…/release.yml• L23-29)
An eligible package fails to publishOther packages can publish, but the release job fails and reports the package for retryThe publish loop continues across packages and the final step fails when any publish failed (.github/…/release.yml• L72-117, .github/…/release.yml• L284-288)
The CLI release tag does not match @thesvg/cli@...Homebrew does not receive the updateThe release creates the separate CLI release and Homebrew filters for that tag (.github/…/release.yml• L271-287, .github/…/homebrew-tap-update.yml• L17-25)
A changed extension keeps its old versionThe Marketplace keeps the prior artifactThe extension lane publishes only after a version change (.github/…/vscode-release.yml• L22-41)
Pages builds without the public PostHog settingsThe deployed site can omit feedback tracking while appearing successfulThe build receives both public analytics values before static export (.github/…/pages.yml• L59-68)

Key files

FileWhy to read it
.github/…/check.ymlChange-aware pull request validation and branch-protection result
.github/…/actionlint.ymlWorkflow syntax validation
.github/…/scorecard.ymlScheduled supply-chain analysis and code-scanning handoff
.github/…/svgo.ymlSVG cleanup and fork pull request behavior
.github/…/validate-svg.ymlFast SVG and catalog quality gate
.github/…/triage-icon-issue.ymlStructured icon issue feedback and labels
.github/…/icon-stats-snapshot.ymlScheduled PostHog feedback snapshot and reusable pull request
.github/…/auto-merge-icon-stats-pr.ymlCI-gated merge for the feedback snapshot pull request
.github/…/version.ymlChange-to-version planning and release pull request creation
.github/…/release.ymlPackage publication, tags, and GitHub releases
.github/…/pages.ymlWebsite build and GitHub Pages deployment
.github/…/homebrew-tap-update.ymlCLI release to Homebrew handoff
.github/…/vscode-release.ymlVS Code extension publication
docs/icon-contribution-automation.mdChild page for icon contribution flow
docs/package-release-and-deployment-automation.mdChild page for package release and deployment detail