|
| 1 | +# GitHub Workflows |
| 2 | + |
| 3 | +This directory contains all GitHub Actions workflows for the Decentraland JS SDK Toolchain. |
| 4 | + |
| 5 | +## Workflow Organization |
| 6 | + |
| 7 | +### Main Workflows |
| 8 | + |
| 9 | +- **`ci.yml`** - Main CI workflow for the entire SDK toolchain |
| 10 | + - Runs linting, testing, building, and publishing for all packages |
| 11 | + - Handles releases and deployments |
| 12 | + |
| 13 | +- **`creator-hub.yml`** - Consolidated Creator Hub CI/CD workflow |
| 14 | + - Replaces all previous `ch-*.yml` workflows |
| 15 | + - Runs on the same triggers as the main CI workflow (push to main/experimental, pull requests, releases) |
| 16 | + - Handles linting, type checking, testing, building, and releasing for Creator Hub |
| 17 | + - Supports both main branch releases and PR previews |
| 18 | + - Includes macOS and Windows builds with code signing |
| 19 | + |
| 20 | +### Utility Workflows |
| 21 | + |
| 22 | +- **`ready_for_review.yml`** - Manual lint and snapshot update workflow |
| 23 | + - Can be triggered manually or automatically on file changes |
| 24 | + - Handles both main SDK and Creator Hub linting |
| 25 | + - Automatically commits fixes |
| 26 | + |
| 27 | +- **`sync-main-to-experimental.yml`** - Syncs main branch to experimental |
| 28 | + - Runs on main branch pushes |
| 29 | + - Creates automated PRs to keep experimental in sync |
| 30 | + |
| 31 | +- **`update-unity-renderer.yml`** - Updates Unity renderer dependencies |
| 32 | + - Scheduled to run on weekdays |
| 33 | + - Creates PRs for dependency updates |
| 34 | + |
| 35 | +- **`release-docs.yml`** - Releases API documentation |
| 36 | + - Triggers on main branch releases |
| 37 | + - Deploys documentation to Cloudflare |
| 38 | + |
| 39 | +## Creator Hub Workflow Details |
| 40 | + |
| 41 | +The `creator-hub.yml` workflow consolidates all Creator Hub related CI/CD processes: |
| 42 | + |
| 43 | +### Jobs |
| 44 | + |
| 45 | +1. **Code Quality** |
| 46 | + - `lint` - ESLint and Prettier checks |
| 47 | + - `typechecking` - TypeScript type checking |
| 48 | + |
| 49 | +2. **Testing** |
| 50 | + - `tests` - Runs tests on macOS and Windows |
| 51 | + - Includes main, preload, renderer, and E2E tests |
| 52 | + |
| 53 | +3. **Release (Main Branch Only)** |
| 54 | + - `drop-pre-release` - Cleans up old pre-releases |
| 55 | + - `build-and-release` - Builds and publishes releases with code signing |
| 56 | + |
| 57 | +4. **PR Preview (Pull Requests Only)** |
| 58 | + - `pr-preview` - Builds preview artifacts for testing |
| 59 | + - Uploads to S3 and posts download links in PR comments |
| 60 | + |
| 61 | +### Features |
| 62 | + |
| 63 | +- **Cross-platform builds** - macOS and Windows support |
| 64 | +- **Code signing** - Automatic signing for both platforms |
| 65 | +- **PR previews** - Automatic preview builds for pull requests |
| 66 | +- **Concurrent execution** - Efficient parallel job execution |
| 67 | +- **Conditional execution** - Jobs only run when needed |
| 68 | +- **Dependency management** - Proper installation and building of all dependencies including Inspector |
| 69 | + |
| 70 | +## Migration from Old Workflows |
| 71 | + |
| 72 | +The following old workflows have been consolidated into `creator-hub.yml`: |
| 73 | + |
| 74 | +- `ch.yml` - Main CH workflow (entry point) |
| 75 | +- `ch-lint.yml` - CH linting |
| 76 | +- `ch-typechecking.yml` - CH type checking |
| 77 | +- `ch-tests.yml` - CH testing |
| 78 | +- `ch-drop.yml` - CH pre-release cleanup |
| 79 | +- `ch-release.yml` - CH release process |
| 80 | + |
| 81 | +## Usage |
| 82 | + |
| 83 | +### Manual Triggers |
| 84 | + |
| 85 | +- Use "workflow_dispatch" to manually trigger any workflow |
| 86 | +- Creator Hub workflow can be triggered independently |
| 87 | + |
| 88 | +### Automatic Triggers |
| 89 | + |
| 90 | +- Push to main/experimental branches |
| 91 | +- Pull requests |
| 92 | +- Releases |
| 93 | +- Scheduled runs (Unity renderer updates) |
| 94 | + |
| 95 | +### Environment Variables |
| 96 | + |
| 97 | +All workflows use the same secrets and environment variables as before. No changes to repository secrets are required. |
| 98 | + |
| 99 | +## Benefits of Reorganization |
| 100 | + |
| 101 | +1. **Simplified Structure** - Single consolidated workflow instead of 6 separate files |
| 102 | +2. **Better Organization** - Clear job grouping and documentation |
| 103 | +3. **Improved Maintainability** - Easier to understand and modify |
| 104 | +4. **Reduced Duplication** - Consolidated dependency installation and build steps |
| 105 | +5. **Better Integration** - Independent workflow that runs on same triggers as main CI |
| 106 | +6. **Enhanced Readability** - Clear comments and job descriptions |
| 107 | +7. **Efficient Dependencies** - Single step installs both Creator Hub and Inspector dependencies |
0 commit comments