Skip to content

Fix auth header (#3) #22

Fix auth header (#3)

Fix auth header (#3) #22

name: Lint & Build
on: [push]
jobs:
lint_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.17"
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: TS check
run: npm run lint:types
- name: Test
run: npm test -- --ci
release:
name: Publish Release (Only for Tags)
runs-on: ubuntu-latest
needs: [lint_and_test] # Ensure lint and test pass before publishing
if: startsWith(github.ref, 'refs/tags/v') # Only run for tag pushes
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.17"
registry-url: "https://registry.npmjs.org"
scope: "@livechat"
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Publish to npm
run: npm publish --public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}