Skip to content

fix: type exports

fix: type exports #73

name: Test, Build, and Publish
on:
workflow_dispatch:
push:
permissions:
contents: write
issues: write
pull-requests: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run verify
build:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm ci
- name: Audit signatures
run: npm audit signatures
- name: Build library
run: npm run build
- uses: actions/upload-artifact@v4
with:
name: lib
path: ./lib
publish:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
package.json
README.md
LICENSE
sparse-checkout-cone-mode: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- uses: actions/download-artifact@v4
with:
name: lib
path: ./lib
- name: Publish library
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npx semantic-release