Skip to content

Commit f928afa

Browse files
committed
chore: add step to create npm organization in package-deployment workflow, ensuring organization exists before publishing
1 parent 4913d7b commit f928afa

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/package-deployment.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,15 @@ jobs:
256256
with:
257257
name: js-packages
258258
path: packages
259+
- name: Create npm organization if it doesn't exist
260+
run: |
261+
echo "Creating or verifying npm organization @agentbridge"
262+
npx npm-cli-login -u "$NPM_USERNAME" -p "$NPM_PASSWORD" -e "$NPM_EMAIL"
263+
npm org create agentbridge "AgentBridge Organization" --no-publish-access || echo "Organization may already exist, continuing..."
264+
env:
265+
NPM_USERNAME: ${{ secrets.NPM_USERNAME }}
266+
NPM_PASSWORD: ${{ secrets.NPM_TOKEN }}
267+
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
259268
- name: Get version if from tag
260269
id: get_version
261270
if: startsWith(github.ref, 'refs/tags/v')

0 commit comments

Comments
 (0)