Skip to content

Merge pull request #226 from ecubus/plugin1 #19

Merge pull request #226 from ecubus/plugin1

Merge pull request #226 from ecubus/plugin1 #19

Workflow file for this run

# This workflow will build and publish the plugin SDK packages to npm
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish Plugin SDK
on:
push:
branches: [master]
paths:
- 'src/main/plugin-sdk/**'
- 'src/renderer/src/plugin-sdk/**'
- '.github/workflows/npm.yml'
workflow_dispatch:
jobs:
publish-sdk:
runs-on: windows-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install
- name: Build SDK packages
run: npm run build:sdk
- name: Build main-plugin-sdk
run: npm run worker
- name: Publish renderer-plugin-sdk
working-directory: ./src/renderer/src/plugin-sdk
run: npm publish --access public
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish main-plugin-sdk
working-directory: ./src/main/plugin-sdk
run: npm publish --access public
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}