Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor Author

@siddharthkp siddharthkp Oct 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Task for the future (after verifying this works): I think this can be optimised by combining common steps between the two jobs

env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm whoami; npm publish --@github:registry='https://npm.pkg.github.com'
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down