Skip to content

Commit

Permalink
Update ci scripts to use yarn (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
igoroctaviano authored Jul 25, 2024
1 parent 246fcf2 commit da12d5b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Publish Package to npmjs
name: dmv/publis-to-npm
on:
release:
types: [published]
jobs:
build:
name: Build and publish to npm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm publish --access public
- run: yarn install --frozen-lockfile
- run: yarn npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_DMV_GRANULAR }}
16 changes: 7 additions & 9 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# This workflow will install JavaScript dependencies, run tests and lint.

name: unit tests
name: dmv/build-and-unit-tests

on:
push:
Expand All @@ -14,20 +12,20 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["12.x", "14.x", "16.x"]
node-version: ["16.x", "20.x"]

steps:
- uses: actions/checkout@v2
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache: "yarn"
- name: Install dependencies
run: npm install
run: yarn
- name: Build package in production mode
run: npm run build
run: yarn build
- name: Lint with standard
run: npm run lint
run: yarn lint
- name: Test with jest
run: npm run test
run: yarn test

0 comments on commit da12d5b

Please sign in to comment.