Skip to content

Commit

Permalink
ci: update publish command (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostrider-05 authored Apr 11, 2024
1 parent 23df164 commit b35b5e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ jobs:
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
# The logic below handles the npm publication:
- uses: actions/checkout@v4
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
with:
Expand All @@ -27,7 +24,13 @@ jobs:
if: ${{ steps.release.outputs.release_created }}
- run: npm ci
if: ${{ steps.release.outputs.release_created }}
- run: npm run publish
- run: npm run prestart
if: ${{ steps.release.outputs.release_created }}
- run: npm run test
if: ${{ steps.release.outputs.release_created }}
- run: npm run lint
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"prestart": "npx tsc && npx gen-esm-wrapper ./dist/index.js ./dist/index.mjs",
"test": "vitest --typecheck",
"test:coverage": "vitest run --typecheck --coverage",
"lint": "npx eslint --fix --ext .ts src/",
"publish": "npm run test && npm run prestart && npm run lint && npm install && npm publish"
"lint": "npx eslint --fix --ext .ts src/"
},
"engines": {
"node": ">=18.17"
Expand Down

0 comments on commit b35b5e0

Please sign in to comment.