ci: add npm run build step to release/publish workflows

After TS migration, main.js is now a build artifact from src/main.ts.
Both workflows must build the plugin before creating the release artifact.
This commit is contained in:
Research Assistant 2026-05-24 19:54:51 +08:00
parent f1d8bb869c
commit b74da81b0e
2 changed files with 17 additions and 1 deletions

View file

@ -18,11 +18,23 @@ jobs:
with:
python-version: '3.11'
- name: Build package
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
cache-dependency-path: paperforge/plugin/package-lock.json
- name: Build Python package
run: |
python -m pip install --upgrade build
python -m build
- name: Build plugin bundle
working-directory: paperforge/plugin
run: |
npm ci
npm run build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:

View file

@ -31,6 +31,10 @@ jobs:
npm ci
npx vitest run --reporter=verbose
- name: Build plugin bundle
working-directory: paperforge/plugin
run: npm run build
- name: Create Release
uses: softprops/action-gh-release@v2
with: