Skip to content

Commit bb5ec9f

Browse files
authored
Independent publishing (#73)
* remove second publish from postpublish * add publish-registry as another job * remove unnecessary --ignore-scripts
1 parent 6451298 commit bb5ec9f

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,18 @@ jobs:
2222
- run: npm whoami; npm publish
2323
env:
2424
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
25+
publish-registry:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v3
29+
- uses: actions/setup-node@v3
30+
with:
31+
node-version: 14
32+
registry-url: https://registry.npmjs.org/
33+
cache: npm
34+
- run: npm ci
35+
- run: npm test
36+
- run: npm version ${TAG_NAME} --git-tag-version=false
37+
env:
38+
TAG_NAME: ${{ github.event.release.tag_name }}
39+
- run: npm whoami; npm publish --@github:registry='https://npm.pkg.github.com'

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
"build": "rollup -c",
1414
"pretest": "npm run build",
1515
"test": "karma start karma.config.js",
16-
"prepublishOnly": "npm run build",
17-
"postpublish": "npm publish --ignore-scripts --@github:registry='https://npm.pkg.github.com'"
16+
"prepublishOnly": "npm run build"
1817
},
1918
"keywords": [
2019
"clipboard",

0 commit comments

Comments
 (0)