Skip to content

fix: update package.json to include exports field and correct reposit… #10

fix: update package.json to include exports field and correct reposit…

fix: update package.json to include exports field and correct reposit… #10

Workflow file for this run

name: Haiti-Utils CI/CD
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types: [created]
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Run tests
run: bun test
publish:
name: Build and Publish
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'release' && github.event.action == 'created'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Build package
run: bun run build
- name: Create .npmrc file
run: |
echo "@dolphfi_:registry=https://registry.npmjs.org/" > ./.npmrc
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ./.npmrc
- name: Publish to npm
run: bunx publint && bun publish --no-git-checks