mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
0705d38b40
* fix(ci): include popup assets in extension release Copy popup assets into the packaged Chrome extension zip and validate that manifest-referenced files exist before publishing the artifact. Co-authored-by: Codex <noreply@openai.com> * fix: restore executable permission on bin entries after tsc build (#446) (#452) tsc does not preserve the +x bit when compiling, so after clean-dist removes dist/ and tsc regenerates it, dist/main.js loses its executable permission. This causes 'Permission denied' when users run 'npm run build' in the installed directory. Fix: read bin entries from package.json at the end of build-manifest and chmod 0o755 them (skipped on Windows). Wrapped in try/catch so it never breaks the build. Closes #446 * fix: correct positional arg usage in tests (#449) * fix yahoo-finance quote e2e invocation * fix positional args in v2ex topic tests * fix(ci): script extension release packaging --------- Co-authored-by: Codex <noreply@openai.com> Co-authored-by: jakevin <jakevingoo@gmail.com> Co-authored-by: pi-dal <hi@pi-dal.com>
68 lines
1.6 KiB
YAML
68 lines
1.6 KiB
YAML
name: Build Chrome Extension
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
tags: [ "v*.*.*" ]
|
|
paths:
|
|
- 'extension/**'
|
|
- '.github/workflows/build-extension.yml'
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
paths:
|
|
- 'extension/**'
|
|
- '.github/workflows/build-extension.yml'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 20
|
|
cache: 'npm'
|
|
cache-dependency-path: extension/package-lock.json
|
|
|
|
- name: Install extension dependencies
|
|
run: npm ci
|
|
working-directory: extension
|
|
|
|
- name: Build extension
|
|
run: npm run build
|
|
working-directory: extension
|
|
|
|
- name: Prepare extension package
|
|
run: npm run package:release -- --out ../extension-package
|
|
working-directory: extension
|
|
|
|
- name: Create Extension ZIP
|
|
run: |
|
|
cd extension-package
|
|
zip -r ../opencli-extension.zip .
|
|
|
|
- name: Upload Artifacts (Action Run)
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: opencli-extension-build
|
|
path: |
|
|
opencli-extension.zip
|
|
retention-days: 7
|
|
|
|
- name: Attach to GitHub Release
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
uses: softprops/action-gh-release@v2.6.1
|
|
with:
|
|
files: |
|
|
opencli-extension.zip
|
|
draft: false
|
|
prerelease: false
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|