diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 8a0568e..5ec2b22 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -57,6 +57,12 @@ jobs: skip-push: "true" skip-commit: "true" bump-policy: "ignore" + + - name: Setup .npmrc + run: | + echo "@fundwave:registry=https://npm.pkg.github.com" >> ~/.npmrc + echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc + echo "ignore-scripts=true" >> ~/.npmrc - name: Install dependencies run: npm ci @@ -72,12 +78,11 @@ jobs: git config user.name "fundabot" git commit -a -m "CI: bumps @fundwave/fetch-queue to $VERSION" -m "[skip ci]" - - name: Publish package to gitlab - env: - GITLAB_TOKEN: ${{secrets.GITLAB_TOKEN}} + - name: Build package + run: npm run build + + - name: Publish package to github run: | - echo @fundwave:registry=https://gitlab.com/api/v4/projects/24877554/packages/npm/ > ~/.npmrc - echo //gitlab.com/api/v4/projects/24877554/packages/npm/:_authToken=$GITLAB_TOKEN >> ~/.npmrc npm publish --tag $BRANCH_TAG - name: Publish package to npm diff --git a/package.json b/package.json index fde8bf9..c59dab7 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ }, "scripts": { "build:esm": "tsc --module NodeNext --outDir ./dist/esm", - "build": "tsc --module commonjs --outDir ./dist/cjs", - "prepare": "npm run build && npm run build:esm", + "build:cjs": "tsc --module commonjs --outDir ./dist/cjs", + "build": "npm run build:cjs && npm run build:esm", "pretest": "jest --clearCache", "test": "jest --detectOpenHandles", "lint": "npx eslint src/index.ts", @@ -20,7 +20,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/getfundwave/fetch-queue.git" + "url": "git+https://github.com/fundwave/fetch-queue.git" }, "keywords": [ "js", @@ -30,9 +30,9 @@ "author": "The Fundwave Authors", "license": "MIT", "bugs": { - "url": "https://github.com/getfundwave/fetch-queue/issues" + "url": "https://github.com/fundwave/fetch-queue/issues" }, - "homepage": "https://github.com/getfundwave/fetch-queue#readme", + "homepage": "https://github.com/fundwave/fetch-queue#readme", "devDependencies": { "@babel/cli": "^7.23.0", "@babel/core": "^7.23.2",