Skip to content

Commit

Permalink
Switch to yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunal Nagar committed May 8, 2021
1 parent 7927970 commit 4a6aa38
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 30 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install npm dependencies
run: npm install
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint code
run: npm run lint
- name: Create npm build
run: npm run build
run: yarn lint
- name: Create build
run: yarn build
- name: Run tests
run: npm test
run: yarn test
- name: Upload test coverage
uses: codecov/codecov-action@v1
- name: Create npm tarball (dry-run)
run: npm pack
- name: Create release tarball (dry-run)
run: yarn pack
22 changes: 0 additions & 22 deletions .github/workflows/npm.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/release-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release to npm

on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x, 16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Create build
run: yarn build
- name: Authenticate with the npm registry
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
- name: Release to npm
run: yarn publish --access public

0 comments on commit 4a6aa38

Please sign in to comment.