Skip to content

Publish Skills to npm #10

Publish Skills to npm

Publish Skills to npm #10

Workflow file for this run

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