From e4fab640fdaeb2299ca12a70f835777406c64f11 Mon Sep 17 00:00:00 2001 From: Xavier Abad <77491413+xabg2@users.noreply.github.com> Date: Tue, 17 Mar 2026 16:01:51 +0100 Subject: [PATCH] Add GitHub Actions workflow for NPM publishing --- .github/workflows/publish-npm.yml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/publish-npm.yml diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 0000000..ba2fab3 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,35 @@ +name: Publish package in NPM package registry +on: + release: + types: [published] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup NodeJS + uses: actions/setup-node@v4 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org/' + + - name: Install dependencies + run: yarn + + - name: Build + run: yarn build + + - name: Setup the NPM registry with token + run: | + echo "registry=https://registry.npmjs.org/" > .npmrc + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc + + - name: Publish on NPM + run: npm publish --scope=@internxt --access public