Skip to content

Commit 2aec507

Browse files
committed
build and test
1 parent 04bc86c commit 2aec507

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.github/workflows/publish-to-npm-on-new-release.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,26 @@ jobs:
1313
with:
1414
node-version: 16
1515
registry-url: https://registry.npmjs.org
16-
- name: Unit Testing
17-
run: npm i && npm run test
18-
1916
- name: Update version
2017
run: |
2118
git config --global user.name "mayank1513"
2219
git config --global user.email "[email protected]"
2320
git fetch
2421
git checkout main
2522
npm version patch
26-
npm -v
27-
git push origin main
28-
- run: npm run publish-package
23+
- name: Build and Test
24+
run: npm i && npm run build && npm run test
25+
- name: Publish to npm
26+
run: npm run publish-package
2927
env:
3028
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
3129

3230
- uses: actions/setup-node@v3
3331
with:
3432
registry-url: https://npm.pkg.github.com/
35-
- run: npm run publish-gpr
33+
- name: Publish to GitHub Public Repository
34+
run: npm run publish-gpr
3635
env:
3736
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
37+
- name: push version bump back to repo
38+
run: git push origin main

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"scripts": {
1212
"build": "tsc && node createPackageJSON.js",
1313
"test": "vitest run",
14-
"publish-package": "npm run build && cp README.md dist/README.md && cd dist && npm publish && cd ..",
14+
"publish-package": "cp README.md dist/README.md && cd dist && npm publish && cd ..",
1515
"publish-gpr": "node prepGPR.js && cd dist && npm publish"
1616
},
1717
"keywords": [

0 commit comments

Comments
 (0)