diff options
| author | Bobby <[email protected]> | 2025-09-24 21:46:12 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2025-09-24 21:46:12 +0530 |
| commit | b9843df604bf7936aa59e57d15a83c9ef0724ec8 (patch) | |
| tree | 596b1597f9abb39da90a4688b18c16f0c68ea5b7 | |
| parent | bdb36b9c1a40f0c9be22676cf590e242d3327147 (diff) | |
| download | thunderbird-ai-compose-b9843df604bf7936aa59e57d15a83c9ef0724ec8.tar.xz thunderbird-ai-compose-b9843df604bf7936aa59e57d15a83c9ef0724ec8.zip | |
add build and release workflows
| -rw-r--r-- | .github/workflows/build.yml | 40 | ||||
| -rw-r--r-- | .github/workflows/release.yml | 48 |
2 files changed, 88 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..be60863 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: Build + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build extension + run: npm run build + + - name: Verify build output + run: | + if [ ! -d "build" ]; then + echo "❌ Build directory not found" + exit 1 + fi + if [ ! -f "build/manifest.json" ]; then + echo "❌ manifest.json not found in build directory" + exit 1 + fi + echo "✅ Build completed successfully" + ls -la build/
\ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..bc5523a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +name: Release + +on: + release: + types: [created] + +permissions: + contents: write + +jobs: + build-and-release: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build and bundle extension + run: npm run release + + - name: Verify release file + run: | + if [ ! -d "release" ]; then + echo "❌ Release directory not found" + exit 1 + fi + XPI_COUNT=$(find release -name "*.xpi" | wc -l) + if [ "$XPI_COUNT" -eq 0 ]; then + echo "❌ No .xpi file found in release directory" + exit 1 + fi + echo "✅ Found $XPI_COUNT .xpi file(s) in release directory" + ls -la release/ + + - name: Upload release assets + uses: softprops/action-gh-release@v2 + with: + files: release/*.xpi + fail_on_unmatched_files: true
\ No newline at end of file |
