Merge pull request #226 from ecubus/plugin1 #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 }} |