Skip to content

Commit

Permalink
fix: deployment ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Mansi1 committed Aug 2, 2023
1 parent 681dfba commit 85d7b7e
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,28 @@ on:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
os: [ubuntu-latest]
node-version: [18.x]
steps:
- uses: actions/cache@v3
with:
path: 'node_modules'
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn build
- name: Add artifact to github
uses: actions/upload-artifact@v2
with:
name: artifact
path: dist
test:
needs: [build]
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -28,21 +43,19 @@ jobs:
with:
path: 'node_modules'
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn build
- name: Add artifact to github
uses: actions/upload-artifact@v2
- name: Download build
uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- run: yarn test
npm-publish:
needs: [build]
needs: [build, test]
name: npm-publish
runs-on: ubuntu-latest
# only on master
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
Expand Down

0 comments on commit 85d7b7e

Please sign in to comment.