-
Notifications
You must be signed in to change notification settings - Fork 43
add beta publish workflow #850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this 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' |
Copilot
AI
Aug 20, 2025
There was a problem hiding this comment.
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.
| 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' |
| 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 |
Copilot
AI
Aug 20, 2025
There was a problem hiding this comment.
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.
| 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 |
Copilot
AI
Aug 20, 2025
There was a problem hiding this comment.
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.
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
|
||
| - name: Publish to npm (beta dist-tag) | ||
| run: pnpm -w changeset publish -- --no-git-checks --tag beta |
Copilot
AI
Aug 20, 2025
There was a problem hiding this comment.
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.
| run: pnpm -w changeset publish -- --no-git-checks --tag beta | |
| run: pnpm -w changeset publish -- --tag beta |
|
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:
|
0559d19 to
449341e
Compare
88f3373 to
2306551
Compare
Summary & Motivation
amir/sdk-jsUsage
git checkout amir/sdk-jsgit pullpnpm changeset pre enter betapnpm changesetHow I Tested These Changes