Skip to content

Comments

#242 update github actions#248

Merged
ienaga merged 1 commit intomainfrom
develop
Feb 10, 2026
Merged

#242 update github actions#248
ienaga merged 1 commit intomainfrom
develop

Conversation

@ienaga
Copy link
Member

@ienaga ienaga commented Feb 10, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 10, 2026 23:05
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

Updates the npm publish GitHub Actions workflow to publish each built package from dist/ explicitly, rather than discovering packages dynamically.

Changes:

  • Replaced a find-based loop that published packages from ./dist with explicit npm publish steps per package directory.
  • Added working-directory per publish step to target specific dist/src and dist/packages/* outputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +27 to +32
- run: npm publish
working-directory: ./dist/src
- run: npm publish
working-directory: ./dist/packages/cache
- run: npm publish
working-directory: ./dist/packages/core
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

npm publish steps don't provide any auth (NODE_AUTH_TOKEN / npm token). With only setup-node and registry-url, publishes will fail unless the token is injected elsewhere. Consider setting NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} (or equivalent) at the job or step level so all publish steps authenticate consistently.

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +30
- run: npm publish
working-directory: ./dist/src
- run: npm publish
working-directory: ./dist/packages/cache
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

The workflow publishes ./dist/src first, but scripts/publish.js rewrites dist/src/package.json to depend on the @next2d/* packages (published later). This can create a window where the newly published @next2d/player version cannot be installed because its dependencies at the same version aren't available yet. Publish the dependency packages first and ./dist/src last (or use a staging tag and promote after all packages are published).

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +58
- run: npm publish
working-directory: ./dist/src
- run: npm publish
working-directory: ./dist/packages/cache
- run: npm publish
working-directory: ./dist/packages/core
- run: npm publish
working-directory: ./dist/packages/display
- run: npm publish
working-directory: ./dist/packages/events
- run: npm publish
working-directory: ./dist/packages/filters
- run: npm publish
working-directory: ./dist/packages/geom
- run: npm publish
working-directory: ./dist/packages/media
- run: npm publish
working-directory: ./dist/packages/net
- run: npm publish
working-directory: ./dist/packages/render-queue
- run: npm publish
working-directory: ./dist/packages/renderer
- run: npm publish
working-directory: ./dist/packages/text
- run: npm publish
working-directory: ./dist/packages/texture-packer
- run: npm publish
working-directory: ./dist/packages/ui
- run: npm publish
working-directory: ./dist/packages/webgl
- run: npm publish
working-directory: ./dist/packages/webgpu
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

This hard-coded list of npm publish directories will require manual updates whenever packages are added/removed/renamed. The previous approach was dynamic; consider replacing the repeated steps with a small shell loop over ./dist/src and ./dist/packages/* (optionally in a dependency-safe order) to reduce drift and maintenance burden.

Suggested change
- run: npm publish
working-directory: ./dist/src
- run: npm publish
working-directory: ./dist/packages/cache
- run: npm publish
working-directory: ./dist/packages/core
- run: npm publish
working-directory: ./dist/packages/display
- run: npm publish
working-directory: ./dist/packages/events
- run: npm publish
working-directory: ./dist/packages/filters
- run: npm publish
working-directory: ./dist/packages/geom
- run: npm publish
working-directory: ./dist/packages/media
- run: npm publish
working-directory: ./dist/packages/net
- run: npm publish
working-directory: ./dist/packages/render-queue
- run: npm publish
working-directory: ./dist/packages/renderer
- run: npm publish
working-directory: ./dist/packages/text
- run: npm publish
working-directory: ./dist/packages/texture-packer
- run: npm publish
working-directory: ./dist/packages/ui
- run: npm publish
working-directory: ./dist/packages/webgl
- run: npm publish
working-directory: ./dist/packages/webgpu
- run: |
set -e
# Publish core source package first
if [ -f "./dist/src/package.json" ]; then
(cd ./dist/src && npm publish)
fi
# Publish all built packages dynamically
for dir in ./dist/packages/*; do
if [ -d "$dir" ] && [ -f "$dir/package.json" ]; then
(cd "$dir" && npm publish)
fi
done

Copilot uses AI. Check for mistakes.
@ienaga ienaga merged commit bf9da26 into main Feb 10, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant