Skip to content

Commit

Permalink
refactor npm publish scripting
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike96Angelo committed Jan 10, 2023
1 parent e3b7046 commit 7d7e793
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/npm-publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ jobs:
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npx tsc
- run: cp package*.json dist/
- run: cp README.md dist/
- run: (cd dist && npm publish)
- run: ./scripts/publish-package.sh
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

Expand All @@ -50,8 +48,6 @@ jobs:
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npx tsc
- run: cp package*.json dist/
- run: cp README.md dist/
- run: (cd dist && npm publish)
- run: ./scripts/publish-package.sh
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "variant-match",
"version": "1.1.2",
"version": "1.1.3",
"description": "Brings variant match pattern to TypeScript.",
"main": "variant.js",
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions scripts/publish-package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

cp package*.json dist/
cp README.md dist/
cp LICENSE dist/
(cd dist && npm publish)

0 comments on commit 7d7e793

Please sign in to comment.