Skip to content

Commit 7d7e793

Browse files
committed
refactor npm publish scripting
1 parent e3b7046 commit 7d7e793

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/npm-publish-packages.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ jobs:
3030
registry-url: https://registry.npmjs.org/
3131
- run: npm ci
3232
- run: npx tsc
33-
- run: cp package*.json dist/
34-
- run: cp README.md dist/
35-
- run: (cd dist && npm publish)
33+
- run: ./scripts/publish-package.sh
3634
env:
3735
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
3836

@@ -50,8 +48,6 @@ jobs:
5048
registry-url: https://npm.pkg.github.com/
5149
- run: npm ci
5250
- run: npx tsc
53-
- run: cp package*.json dist/
54-
- run: cp README.md dist/
55-
- run: (cd dist && npm publish)
51+
- run: ./scripts/publish-package.sh
5652
env:
5753
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "variant-match",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"description": "Brings variant match pattern to TypeScript.",
55
"main": "variant.js",
66
"scripts": {

scripts/publish-package.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
cp package*.json dist/
4+
cp README.md dist/
5+
cp LICENSE dist/
6+
(cd dist && npm publish)

0 commit comments

Comments
 (0)