Skip to content

Commit

Permalink
chore: update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
markxoe committed Mar 31, 2023
1 parent 5ee0716 commit 46e5770
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:

jobs:
test:
name: Test and Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -21,6 +22,33 @@ jobs:
- name: Install node dependencies
run: |
npm ci
- name: run tests
- name: Run tests
run: |
npm test
- name: Build
run: |
npm run build
deploy:
name: Deploy to npm
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
with:
# Fetch entire commit history.
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- name: Install deps
run: |
npm ci
- name: Build
run: |
npm run build
- name: Publish to NPM
run: |
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 46e5770

Please sign in to comment.