diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c3434a6..50531d2 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 --@github:registry='https://npm.pkg.github.com' 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",