2025-01-25 07:08:20 +02:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main, master]
|
|
|
|
pull_request:
|
|
|
|
branches: [main, master]
|
|
|
|
|
|
|
|
jobs:
|
2025-01-25 07:15:40 +02:00
|
|
|
build-and-publish:
|
2025-01-25 07:08:20 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2025-01-25 07:15:40 +02:00
|
|
|
- name: Use Node.js
|
2025-01-25 07:08:20 +02:00
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
2025-01-25 07:15:40 +02:00
|
|
|
node-version: "18.x"
|
|
|
|
registry-url: "https://registry.npmjs.org"
|
2025-01-25 07:08:20 +02:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: npm ci
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: npm run build
|
|
|
|
|
2025-01-25 07:15:40 +02:00
|
|
|
- name: Publish to NPM
|
|
|
|
run: npm publish
|
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
|