Skip to content

Commit

Permalink
Add ci yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar committed Nov 4, 2024
1 parent 38aaab8 commit 98db8e3
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish

on:
release:
types: [published]

jobs:
publish:
name: "Publish to npm registry"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.17.0'

- run: |
npm ci
npm test
- uses: JS-DevTools/npm-publish@4b07b26a2f6e0a51846e1870223e545bae91c552
if: github.event_name == 'release'
with:
token: ${{ secrets.NPM_PUBLISH_FOR_PUBLIC_REPO }}
registry: "https://registry.npmjs.org"

22 changes: 22 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: test
run-name: ${{ github.actor }} - test
on: [pull_request, push]
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.17.0'

- run: |
node --version
npm --version
npm ci
npm run build
npm test

0 comments on commit 98db8e3

Please sign in to comment.