Skip to content

Commit

Permalink
chore: update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjoDiaz committed May 16, 2023
1 parent 19c9625 commit 5ddd9d6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/on-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
node-version: [18.x, 16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules on Linux
uses: actions/cache@v2
uses: actions/cache@v3
if: ${{ runner.OS != 'Windows' }}
with:
path: ~/.npm
Expand All @@ -27,20 +27,20 @@ jobs:
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Cache Node.js modules on Windows
uses: actions/cache@v2
uses: actions/cache@v3
if: ${{ runner.OS == 'Windows' }}
with:
path: ~\AppData\Roaming\npm-cache
key: ${{ runner.os }}-node-${{ hashFiles('**\package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- run: npm ci --workspaces --include-workspace-root
- run: npm ci
- run: npm run lint
- name: Unit tests
run: npm run test-with-coverage
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.node-version }}
Expand All @@ -50,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
22 changes: 20 additions & 2 deletions .github/workflows/on-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,31 @@ jobs:
- '@streamparser/json-whatwg'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: '18.x'
# Needs to be explicitly specified for auth to work
registry-url: 'https://registry.npmjs.org'
- name: Cache Node.js modules on Linux
uses: actions/cache@v3
if: ${{ runner.OS != 'Windows' }}
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Cache Node.js modules on Windows
uses: actions/cache@v3
if: ${{ runner.OS == 'Windows' }}
with:
path: ~\AppData\Roaming\npm-cache
key: ${{ runner.os }}-node-${{ hashFiles('**\package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- run: npm ci
- run: npm run build
- run: npm publish --access public -w ${{ matrix.package }}
Expand Down

0 comments on commit 5ddd9d6

Please sign in to comment.