Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/release-publish-new-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,22 @@ jobs:
- name: Setup and Build
uses: ./.github/actions/setup-nodejs

- name: Check package does not already exist on NPM
working-directory: ${{ github.event.inputs.package-path }}
run: |
PACKAGE_NAME=$(node -p "require('./package.json').name")
if [ "$PACKAGE_NAME" = "n8n-monorepo" ]; then
echo "::error::Package 'n8n-monorepo' cannot be published."
exit 1
fi
if npm view "$PACKAGE_NAME" > /dev/null 2>&1; then
echo "::error::Package '$PACKAGE_NAME' already exists on NPM. Use the regular release workflow for updates."
exit 1
fi
echo "Package '$PACKAGE_NAME' does not exist on NPM yet. Proceeding with publish."

- name: Configure NPM token
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_INITIAL_PUBLISH_TOKEN }}" > ~/.npmrc

- name: Publish package
working-directory: ${{ github.event.inputs.package-path }}
Expand Down
Loading