Skip to content

ref: Remove dist/ from version control in main#101

Open
dcramer wants to merge 1 commit intomainfrom
remove-dist-from-main
Open

ref: Remove dist/ from version control in main#101
dcramer wants to merge 1 commit intomainfrom
remove-dist-from-main

Conversation

@dcramer
Copy link
Member

@dcramer dcramer commented Feb 4, 2026

Remove dist/ from main branch while preserving GitHub Action functionality on release tags.

Previously, dist/action/ was committed to main and updated on every release. This cluttered the repo history and made main heavier than necessary. The action bundle is only needed by users referencing release tags, not main.

New release flow:

  1. Craft creates release branch, bumps version in package.json, merges to main, publishes to npm
  2. Workflow builds dist/action/ on the release branch and commits artifacts there
  3. Creates tag (e.g., v1.2.3) pointing to the artifact commit
  4. Creates GitHub release via gh release create
  5. Updates rolling major version tag (v1) for users who pin to major versions

Changes:

  • Remove dist/action/ from git (7 files)
  • Simplify .gitignore to just dist/
  • Remove dist build from bump-version.sh (version bump only now)
  • Remove github target from .craft.yml (craft handles npm publishing only)
  • Add workflow steps for artifact build, tag creation, and GitHub release

Tags are created once correctly on the artifact commit, eliminating the need for force-pushing release tags. Only rolling major version tags (v1, v2) are force-pushed, which is expected behavior.

- Remove dist/action/ from git tracking (7 files)
- Simplify .gitignore to just ignore dist/
- Remove dist build from bump-version.sh (version bump only)
- Remove github target from .craft.yml (craft handles npm only)
- Add workflow steps to build artifacts on release branch,
  create tags, GitHub releases, and update major version tags

The release flow now:
1. Craft creates release branch, bumps version, merges to main, publishes to npm
2. Workflow builds dist/action/ on release branch, commits artifacts
3. Creates tag pointing to artifact commit (no force-push)
4. Creates GitHub release via gh CLI
5. Updates rolling major version tag (v1, etc.)

This keeps dist/ out of main while ensuring GitHub Action users
can still reference tags that contain the bundled action.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
warden Ready Ready Preview, Comment Feb 4, 2026 9:08pm

Request Review

Comment on lines +70 to +71
pnpm build
pnpm build:action
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Missing pnpm install before build commands (high confidence)

The workflow runs pnpm build and pnpm build:action (lines 70-71) without first running pnpm install. Dependencies won't exist and the build will fail. The CI workflow correctly runs pnpm install --frozen-lockfile before building.

Suggested fix: Add pnpm install --frozen-lockfile before the build commands

Suggested change
pnpm build
pnpm build:action
# Install dependencies
pnpm install --frozen-lockfile

Identified by Warden via notseer · critical, high confidence

fi
# Commit artifacts to release branch
git add -f dist/action/
git commit -m "build: Add action artifacts for ${TAG}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Missing git user configuration before commit (high confidence)

The workflow runs git commit (line 75) without configuring git user.name and user.email. Git requires these to create commits and will fail with 'Author identity unknown'. The update-major-tag.yml workflow correctly sets these before committing.

Suggested fix: Add git config for user identity before the commit

Suggested change
git commit -m "build: Add action artifacts for ${TAG}"
# Configure git identity for commits
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

Identified by Warden via notseer · critical, high confidence

fi
# Commit artifacts to release branch
git add -f dist/action/
git commit -m "build: Add action artifacts for ${TAG}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The release workflow is missing git config for user.name and user.email before the git commit command, which will cause the commit and the workflow to fail.
Severity: CRITICAL

Suggested Fix

Add the following lines before the git commit command in the release.yml workflow: git config user.name "github-actions[bot]" and git config user.email "github-actions[bot]@users.noreply.github.com".

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .github/workflows/release.yml#L75

Potential issue: The release workflow attempts to create a git commit using `git commit`
but fails to configure a git user identity beforehand. GitHub Actions runners do not
have a default `user.name` or `user.email`, causing the commit command to fail. This is
evidenced by another workflow in the same repository, `update-major-tag.yml`, which
correctly includes the necessary `git config` steps, indicating this is a known
requirement that was missed.

Did we get this right? 👍 / 👎 to inform future reviews.

Comment on lines +70 to +71
pnpm build
pnpm build:action
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The release workflow runs build commands after git checkout without first running pnpm install, causing the build to fail due to missing dependencies.
Severity: CRITICAL

Suggested Fix

Add a pnpm install --frozen-lockfile command after the git checkout "$RELEASE_BRANCH" line and before the pnpm build command to ensure dependencies are installed and match the lockfile.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .github/workflows/release.yml#L70-L71

Potential issue: The release workflow runs `pnpm build` and `pnpm build:action`
immediately after checking out the release branch with `git checkout "$RELEASE_BRANCH"`.
It does not run `pnpm install` after switching branches. This will cause the build to
fail because the required dependencies (like `tsc` and `ncc`) will not be installed or
may be out of sync with the `pnpm-lock.yaml` file of the release branch.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

fi
# Build artifacts
pnpm build
pnpm build:action
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing pnpm install before build commands

High Severity

The workflow runs pnpm build and pnpm build:action without first running pnpm install to install dependencies. The old bin/bump-version.sh included pnpm install --frozen-lockfile before the build commands, but when the build logic was moved to the workflow, the install step was not included. Other workflows in this repo (like ci.yml and warden.yml) correctly run pnpm install --frozen-lockfile before building. The build will fail because node_modules won't exist.

Fix in Cursor Fix in Web

fi
# Commit artifacts to release branch
git add -f dist/action/
git commit -m "build: Add action artifacts for ${TAG}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing git user configuration before commit

High Severity

The workflow runs git commit without configuring git user.name and git user.email. GitHub Actions runners don't have a default git user configured, so the commit will fail with "Author identity unknown". The repo's own update-major-tag.yml workflow correctly sets git config user.name and git config user.email before committing.

Fix in Cursor Fix in Web

@dcramer
Copy link
Member Author

dcramer commented Feb 4, 2026

we need to figure out a path here but this prob isnt it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant