Publish Skills to npm #10
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
| name: Publish Skills to npm | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version bump type (patch, minor, major) or specific version' | |
| required: false | |
| default: 'patch' | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Upgrade npm for trusted publishers | |
| run: npm install -g npm@latest | |
| - name: Configure git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Bump version (manual trigger only) | |
| if: github.event_name == 'workflow_dispatch' | |
| run: | | |
| npm version ${{ github.event.inputs.version }} -m "Release v%s" | |
| git push --follow-tags | |
| - name: Publish to npm | |
| run: npm publish --access public --provenance |