Skip to content

Add reusable NPM publish workflow - #1

Merged
oneminch merged 2 commits into
mainfrom
copilot/modify-publish-workflow
Dec 1, 2025
Merged

oneminch merged 2 commits into
mainfrom
copilot/modify-publish-workflow

Conversation

Copilot AI commented Dec 1, 2025 •

Copy link
Copy Markdown
Contributor

Converts the publish workflow from oneminch/useEventSource into a reusable workflow that can be called from other repositories via workflow_call.

Changes

  • Created .github/workflows/publish.yml with workflow_call trigger
  • Added configurable inputs: node-version, registry-url, pnpm-version, upgrade-npm
  • Added required NPM_TOKEN secret for registry authentication
  • Made npm upgrade step conditional via input flag

Usage

name: Publish

on:
  push:
    tags:
      - "v*"

jobs:
  publish:
    uses: oneminch/workflows/.github/workflows/publish.yml@main
    with:
      node-version: "22"
    secrets:
      NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com//advisories
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Add this workflow (https://github.com/oneminch/useEventSource/blob/main/.github/workflows/publish.yml) under '.github/workflows' but modify it so that I can reuse it across other repos by referencing it.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update publish workflow for reusability across repos Add reusable NPM publish workflow Dec 1, 2025
Copilot AI requested a review from oneminch December 1, 2025 13:40
@oneminch
oneminch marked this pull request as ready for review December 1, 2025 13:43
@oneminch
oneminch merged commit 92525bc into main Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants