Skip to content

Commit

Permalink
Add tsup and keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
johnchourajr committed Dec 2, 2024
1 parent 9290612 commit 25f30f6
Show file tree
Hide file tree
Showing 4 changed files with 1,709 additions and 50 deletions.
32 changes: 14 additions & 18 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,28 @@ name: Publish to NPM
on:
push:
tags:
- "v*.*.*" # Matches version tags like v1.0.0, v2.1.3, etc.
- "v*.*.*"

jobs:
publish:
runs-on: ubuntu-latest

steps:
# Step 1: Check out the code from the repository
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/checkout@v3

# Step 2: Set up Node.js environment
- name: Set up Node.js
uses: actions/setup-node@v3
- uses: actions/setup-node@v3
with:
node-version: "18" # Use the Node.js version compatible with your package
registry-url: "https://registry.npmjs.org/" # NPM registry URL
node-version: "18"
registry-url: "https://registry.npmjs.org/"
cache: "npm"

# Step 3: Install dependencies and build the package
- name: Install dependencies and build
run: |
npm install
npm run build # Build the package
- name: Install dependencies
run: npm ci

# Step 4: Publish the package to NPM
- name: Publish to NPM
run: npm publish --access public # Publish the package to NPM
- name: Build
run: npm run build

- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Use the NPM token from GitHub Secrets
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading

0 comments on commit 25f30f6

Please sign in to comment.