diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 0000000..736a4a8 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,36 @@ +name: Publish to npm + +on: + release: + types: [created] + +permissions: + contents: read + id-token: write + +jobs: + publish: + runs-on: shopify-ubuntu-latest + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + + - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org' + + - name: Verify version matches release tag + run: | + PACKAGE_VERSION=$(node -p "require('./package.json').version") + TAG_VERSION=${GITHUB_REF#refs/tags/v} + + echo "Package version: $PACKAGE_VERSION" + echo "Tag version: $TAG_VERSION" + + if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then + echo "Version mismatch: package.json ($PACKAGE_VERSION) != tag ($TAG_VERSION)" + exit 1 + fi + + - name: Publish + run: npm publish --access public --provenance diff --git a/package.json b/package.json index 810e5a7..be1ad0a 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,17 @@ { - "name": "shopify-plugin", + "name": "@shopify/shopify-ai-toolkit", "version": "1.0.0", - "private": true, - "description": "AI agent plugin manifests for the Shopify Dev MCP server", + "description": "AI agent skills for building Shopify apps — GraphQL, Liquid, Hydrogen, UI Extensions, and more", "author": "Shopify", "license": "MIT", - "keywords": ["shopify", "mcp", "graphql", "liquid", "storefront", "admin-api", "plugin"] + "keywords": ["shopify", "agent-skills", "graphql", "liquid", "storefront", "admin-api", "hydrogen", "polaris"], + "files": [ + "skills/", + "README.md" + ], + "repository": { + "type": "git", + "url": "https://github.com/Shopify/shopify-ai-toolkit.git" + }, + "homepage": "https://github.com/Shopify/shopify-ai-toolkit#readme" }