From 019e38db3ab7eb8d228beb16e5a6ab5f38e1d7b2 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 28 May 2026 17:32:14 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20drop=20npm=20publish=20workflow=20?= =?UTF-8?q?=E2=80=94=20project=20is=20PyPI-only=20going=20forward?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This repository will no longer publish to npm. The published Python package `simplicio-mapper` on PyPI is the only distribution channel from 0.6.0 onward; existing npm versions of `@wesleysimplicio/llm-project-mapper` remain available but receive no further releases. Remove `.github/workflows/publish-npm.yml` so a stray push to main doesn't attempt to publish (and so the workflow does not show as failing without an `NPM_TOKEN` secret). `package.json` and the Node tooling stay for local development of the starter scaffold. https://claude.ai/code/session_01JdmemqddwFnvbceWyuDE8m --- .github/workflows/publish-npm.yml | 116 ------------------------------ 1 file changed, 116 deletions(-) delete mode 100644 .github/workflows/publish-npm.yml diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml deleted file mode 100644 index 9985771..0000000 --- a/.github/workflows/publish-npm.yml +++ /dev/null @@ -1,116 +0,0 @@ -# Publish to npm — publica o pacote automaticamente quando main é atualizada. -# Idempotente: compara versão local com a publicada e só publica se diferente. -# -# Requisitos: -# - Secret `NPM_TOKEN` configurado no repositório (npm automation token). -# - Permissões `contents: write` (para criar tag) e `id-token: write` (provenance). - -name: Publish to npm - -on: - push: - branches: - - main - workflow_dispatch: - -permissions: - contents: write - id-token: write - -concurrency: - group: publish-npm-${{ github.ref }} - cancel-in-progress: false - -jobs: - publish: - name: Publish package - runs-on: ubuntu-latest - if: github.repository == 'wesleysimplicio/simplicio-mapper' - timeout-minutes: 15 - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - registry-url: 'https://registry.npmjs.org' - cache: npm - - - name: Install dependencies - run: npm ci - - - name: Read package metadata - id: meta - run: | - set -euo pipefail - PKG_NAME=$(node -p "require('./package.json').name") - LOCAL_VERSION=$(node -p "require('./package.json').version") - PUBLISHED_VERSION=$(npm view "$PKG_NAME" version 2>/dev/null || echo "none") - echo "name=$PKG_NAME" >> "$GITHUB_OUTPUT" - echo "local=$LOCAL_VERSION" >> "$GITHUB_OUTPUT" - echo "published=$PUBLISHED_VERSION" >> "$GITHUB_OUTPUT" - if [ "$LOCAL_VERSION" != "$PUBLISHED_VERSION" ]; then - echo "should_publish=true" >> "$GITHUB_OUTPUT" - else - echo "should_publish=false" >> "$GITHUB_OUTPUT" - fi - echo "Pacote: $PKG_NAME" - echo "Versão local: $LOCAL_VERSION" - echo "Versão publicada: $PUBLISHED_VERSION" - - - name: Skip notice (version unchanged) - if: steps.meta.outputs.should_publish != 'true' - run: | - echo "::notice::Versão ${{ steps.meta.outputs.local }} já publicada no npm. Skipping." - - - name: Verify package contents (dry run) - if: steps.meta.outputs.should_publish == 'true' - run: npm pack --dry-run - - - name: Verify npm auth (whoami) - if: steps.meta.outputs.should_publish == 'true' - run: | - if [ -z "${NODE_AUTH_TOKEN:-}" ]; then - echo "::error::Secret NPM_TOKEN está vazio ou ausente no repositório." - exit 1 - fi - echo "Token length: ${#NODE_AUTH_TOKEN}" - npm whoami - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Publish to npm - if: steps.meta.outputs.should_publish == 'true' - run: npm publish --provenance --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Tag release - if: steps.meta.outputs.should_publish == 'true' - run: | - set -euo pipefail - TAG="v${{ steps.meta.outputs.local }}" - if git rev-parse "$TAG" >/dev/null 2>&1; then - echo "Tag $TAG já existe, pulando." - exit 0 - fi - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git tag -a "$TAG" -m "Release $TAG" - git push origin "$TAG" - - - name: Summary - if: always() - run: | - { - echo "## Publish to npm" - echo "" - echo "- Pacote: \`${{ steps.meta.outputs.name }}\`" - echo "- Versão local: \`${{ steps.meta.outputs.local }}\`" - echo "- Versão publicada: \`${{ steps.meta.outputs.published }}\`" - echo "- Ação: \`${{ steps.meta.outputs.should_publish == 'true' && 'PUBLICADO' || 'SKIPPED (versão inalterada)' }}\`" - } >> "$GITHUB_STEP_SUMMARY"