Skip to content

Commit

Permalink
chore: setup CI
Browse files Browse the repository at this point in the history
  • Loading branch information
yannamsellem committed Jan 6, 2025
1 parent 5a96558 commit f790925
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish package to NPM
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: npm i
- run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
- run: npm version ${{ github.ref_name }} --no-git-tag-version --force
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Browser Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
cache: "npm"

- name: Install dependencies
run: npm install

- name: Run browser tests
run: npm run test:browser

0 comments on commit f790925

Please sign in to comment.