Skip to content

Conversation

@turnekybc
Copy link
Contributor

Summary & Motivation

  • implement a workflow to publish beta versions off of amir/sdk-js

Usage

  • git checkout amir/sdk-js
  • git pull
  • pnpm changeset pre enter beta
  • pnpm changeset

How I Tested These Changes

  • locally via verdaccio

@vercel
Copy link

vercel bot commented Aug 20, 2025

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

Project Deployment Preview Updated (UTC)
sdk-react-components Ready Ready Preview Aug 20, 2025 7:28pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a GitHub Actions workflow to publish beta versions from the amir/sdk-js branch. The workflow automates the entire beta release process including versioning, testing, and publishing to npm with a beta dist-tag.

Key changes:

  • Adds a comprehensive beta release workflow with automatic version bumping via changesets
  • Implements sequential testing against both preprod and production environments
  • Includes safety checks to ensure beta-only publishing with manual approval gates

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

git config user.email "[email protected]"

- name: Version (Changesets) + your version script
if: steps.has_changesets.outputs.count != '0'
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

The condition uses string comparison '0' instead of numeric comparison. Consider using steps.has_changesets.outputs.has == 'true' for consistency with the boolean output or ensure all comparisons use the same format.

Suggested change
if: steps.has_changesets.outputs.count != '0'
if: steps.has_changesets.outputs.has == 'true'
run: |
git config user.name "tkhq-deploy"
git config user.email "[email protected]"
- name: Version (Changesets) + your version script
if: steps.has_changesets.outputs.has == 'true'

Copilot uses AI. Check for mistakes.
run: pnpm install -r --frozen-lockfile

- name: Test (preprod)
run: anvil & PN=$!; pnpm run test-all; RC=$?; lsof -t -i tcp:8545 | xargs -r kill; wait $PN || true; exit $RC
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

This complex one-liner command should be broken into multiple steps or moved to a script file for better readability and maintainability. The process management logic is difficult to understand and debug.

Copilot uses AI. Check for mistakes.
run: pnpm install -r --frozen-lockfile

- name: Test (prod)
run: anvil & PN=$!; pnpm run test-all; RC=$?; lsof -t -i tcp:8545 | xargs -r kill; wait $PN || true; exit $RC
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

This complex one-liner command is duplicated from line 142. Consider extracting this logic into a reusable script or composite action to avoid code duplication.

Copilot uses AI. Check for mistakes.
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish to npm (beta dist-tag)
run: pnpm -w changeset publish -- --no-git-checks --tag beta
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

The --no-git-checks flag bypasses important safety checks during publishing. Consider removing this flag unless there's a specific reason to skip git validation, as it could allow publishing from an unintended state.

Suggested change
run: pnpm -w changeset publish -- --no-git-checks --tag beta
run: pnpm -w changeset publish -- --tag beta

Copilot uses AI. Check for mistakes.
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit e048f2a:

Sandbox Source
@turnkey/example-react-components Configuration

Base automatically changed from amir/sdk-js to main September 9, 2025 02:42
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.

6 participants