|
| 1 | +# Release Guide |
| 2 | + |
| 3 | +This document outlines how to create releases for the LGamila project. |
| 4 | + |
| 5 | +## Browser Extension Releases |
| 6 | + |
| 7 | +The project includes an automated GitHub Actions workflow that builds the browser extension for both Chrome and Firefox and publishes it as a GitHub release. |
| 8 | + |
| 9 | +### Automated Release (Recommended) |
| 10 | + |
| 11 | +#### Via Git Tags |
| 12 | + |
| 13 | +1. **Update the version** in `apps/extension/package.json` |
| 14 | +2. **Commit your changes**: |
| 15 | + ```bash |
| 16 | + git add apps/extension/package.json |
| 17 | + git commit -m "chore: bump extension version to v1.0.1" |
| 18 | + ``` |
| 19 | +3. **Create and push a git tag**: |
| 20 | + ```bash |
| 21 | + git tag v1.0.1 |
| 22 | + git push origin v1.0.1 |
| 23 | + ``` |
| 24 | +4. **The workflow will automatically**: |
| 25 | + - Build the extension for Chrome (MV3) and Firefox (MV2) |
| 26 | + - Package both builds into zip files |
| 27 | + - Create a GitHub release with both files attached |
| 28 | + - Include detailed installation instructions |
| 29 | + |
| 30 | +#### Via Manual Trigger |
| 31 | + |
| 32 | +1. Go to the [Actions tab](https://github.com/stormix/moroccan-stream/actions) on GitHub |
| 33 | +2. Select the "Release Extension" workflow |
| 34 | +3. Click "Run workflow" |
| 35 | +4. Enter the version (e.g., `v1.0.1`) |
| 36 | +5. Click "Run workflow" |
| 37 | + |
| 38 | +### Manual Release (Local Build) |
| 39 | + |
| 40 | +If you need to build releases locally: |
| 41 | + |
| 42 | +```bash |
| 43 | +# Navigate to extension directory |
| 44 | +cd apps/extension |
| 45 | + |
| 46 | +# Build for both browsers |
| 47 | +pnpm build:all |
| 48 | + |
| 49 | +# Package for both browsers |
| 50 | +pnpm package:all |
| 51 | + |
| 52 | +# Files will be created in: |
| 53 | +# - build/chrome-mv3-prod.zip (Chrome) |
| 54 | +# - build/firefox-mv2-prod.zip (Firefox) |
| 55 | +``` |
| 56 | + |
| 57 | +## Release Workflow Details |
| 58 | + |
| 59 | +The release workflow (`.github/workflows/release.yml`) performs the following steps: |
| 60 | + |
| 61 | +1. **Environment Setup**: Installs Node.js, pnpm, and project dependencies |
| 62 | +2. **Multi-Browser Build**: |
| 63 | + - Builds extension for Chrome (Manifest V3) |
| 64 | + - Builds extension for Firefox (Manifest V2) |
| 65 | +3. **Packaging**: Creates zip files for both browser builds |
| 66 | +4. **Release Creation**: Creates a GitHub release with: |
| 67 | + - Proper semantic versioning |
| 68 | + - Detailed release notes |
| 69 | + - Installation instructions for both browsers |
| 70 | + - Both browser builds attached as assets |
| 71 | + |
| 72 | +## Browser-Specific Notes |
| 73 | + |
| 74 | +### Chrome (Manifest V3) |
| 75 | + |
| 76 | +- Uses the latest Manifest V3 format |
| 77 | +- Supports all modern Chrome extension APIs |
| 78 | +- Compatible with Chrome, Edge, and other Chromium-based browsers |
| 79 | + |
| 80 | +### Firefox (Manifest V2) |
| 81 | + |
| 82 | +- Uses Manifest V2 for Firefox compatibility |
| 83 | +- Includes Firefox-specific adaptations |
| 84 | +- Tested with Firefox Developer Edition |
| 85 | + |
| 86 | +## Version Management |
| 87 | + |
| 88 | +- Extension version is managed in `apps/extension/package.json` |
| 89 | +- Git tags should follow semantic versioning (e.g., `v1.0.0`, `v1.0.1`, `v1.1.0`) |
| 90 | +- Release notes are automatically generated with installation instructions |
| 91 | + |
| 92 | +## Testing Releases |
| 93 | + |
| 94 | +Before creating a release: |
| 95 | + |
| 96 | +1. **Test locally**: |
| 97 | + |
| 98 | + ```bash |
| 99 | + cd apps/extension |
| 100 | + pnpm build:all |
| 101 | + ``` |
| 102 | + |
| 103 | +2. **Load both builds** in their respective browsers to ensure functionality |
| 104 | + |
| 105 | +3. **Verify all features** work correctly in both browsers |
| 106 | + |
| 107 | +## Troubleshooting |
| 108 | + |
| 109 | +### Workflow Fails |
| 110 | + |
| 111 | +- Check that all dependencies are properly listed |
| 112 | +- Ensure `apps/extension/package.json` has the correct version |
| 113 | +- Verify Plasmo build commands work locally |
| 114 | + |
| 115 | +### Missing Browser Builds |
| 116 | + |
| 117 | +- Confirm Plasmo supports the target browser |
| 118 | +- Check build logs for any browser-specific errors |
| 119 | +- Ensure all required permissions are set in manifest |
| 120 | + |
| 121 | +### Release Creation Issues |
| 122 | + |
| 123 | +- Verify GitHub token has proper permissions |
| 124 | +- Check that tag format matches workflow triggers |
| 125 | +- Ensure no existing release exists with the same tag |
0 commit comments