diff options
| -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 |
