From a934ce7adeb75d2f32818e1c81e4a71b55d754df Mon Sep 17 00:00:00 2001 From: Siddharth Kshetrapal Date: Mon, 10 Oct 2022 16:49:09 +0200 Subject: [PATCH 1/3] remove second publish from postpublish --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index c91b493..5945be3 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,7 @@ "build": "rollup -c", "pretest": "npm run build", "test": "karma start karma.config.js", - "prepublishOnly": "npm run build", - "postpublish": "npm publish --ignore-scripts --@github:registry='https://npm.pkg.github.com'" + "prepublishOnly": "npm run build" }, "keywords": [ "clipboard", From 668d1fc638130ce0ac1e87d58abd31836ccac171 Mon Sep 17 00:00:00 2001 From: Siddharth Kshetrapal Date: Mon, 10 Oct 2022 16:54:12 +0200 Subject: [PATCH 2/3] add publish-registry as another job --- .github/workflows/publish.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c3434a6..e8ddd71 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,3 +22,18 @@ jobs: - run: npm whoami; npm publish env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} + publish-registry: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 14 + registry-url: https://registry.npmjs.org/ + cache: npm + - run: npm ci + - run: npm test + - run: npm version ${TAG_NAME} --git-tag-version=false + env: + TAG_NAME: ${{ github.event.release.tag_name }} + - run: npm whoami; npm publish --ignore-scripts --@github:registry='https://npm.pkg.github.com' From b6e76817b8bc623ae104377073d143a6676df2c1 Mon Sep 17 00:00:00 2001 From: Siddharth Kshetrapal Date: Mon, 10 Oct 2022 17:08:26 +0200 Subject: [PATCH 3/3] remove unnecessary --ignore-scripts --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e8ddd71..50531d2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -36,4 +36,4 @@ jobs: - run: npm version ${TAG_NAME} --git-tag-version=false env: TAG_NAME: ${{ github.event.release.tag_name }} - - run: npm whoami; npm publish --ignore-scripts --@github:registry='https://npm.pkg.github.com' + - run: npm whoami; npm publish --@github:registry='https://npm.pkg.github.com'