Skip to content

Commit

Permalink
Ensure npm run prepublish gets executed (#190)
Browse files Browse the repository at this point in the history
* Ensure `npm run prepublish` gets executed

* Switch to prepublishOnly

* Include install in publish script

* Keep registry and version

* Run build during tests
  • Loading branch information
AndyBitz authored Nov 1, 2022
1 parent a2c28fb commit 7542017
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
timeout-minutes: 5 # See https://github.com/actions/cache/issues/810
with:
cache: 'yarn'
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'

- run: yarn install --network-timeout 1000000 --frozen-lockfile
- run: npm run test
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
cache: 'yarn'

- run: yarn install --network-timeout 1000000 --frozen-lockfile
- run: yarn run build-views
- run: yarn test
- run: yarn run coverage

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"coverage": "nyc report --reporter=text-lcov > coverage.lcov",
"lint-staged": "git diff --diff-filter=ACMRT --cached --name-only '*.js' '*.jsx' | xargs zeit-eslint",
"build-views": "dottojs -s ./src -d ./src",
"prepublish": "yarn run build-views"
"prepublishOnly": "yarn run build-views"
},
"repository": "zeit/serve-handler",
"keywords": [
Expand Down

0 comments on commit 7542017

Please sign in to comment.