Skip to content

Commit

Permalink
Update GHA workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
hildjj committed Jul 16, 2024
1 parent c66dd8b commit 46b9b0a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,8 @@ jobs:
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Check coding standards
if: matrix.node-version == '21.x' && matrix.os == 'ubuntu-latest'
run: npm run lint
- name: Static analysis - check types
if: matrix.node-version == '21.x' && matrix.os == 'ubuntu-latest'
run: npm run build
- name: Test
run: npm run test
- uses: codecov/codecov-action@v3
run: npm run ci
- uses: codecov/codecov-action@v4
with:
files: coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
- run: pnpm i -r
- run: npm run ci
- run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"build": "tsc",
"lint": "eslint .",
"test": "c8 node --stack-trace-limit=1000 --experimental-vm-modules --test"
"test": "c8 node --stack-trace-limit=1000 --experimental-vm-modules --test",
"ci": "npm run build && npm run lint && npm run test"
},
"keywords": [
"vm",
Expand Down

0 comments on commit 46b9b0a

Please sign in to comment.