Skip to content

Commit

Permalink
npm...
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohn committed Nov 3, 2024
1 parent fafb970 commit 5f30ba8
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
on: push
name: Publish to npm

on:
push:
branches:
- main # adjust to your main branch name

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- run: npm install
- run: npm test
- run: npm publish --access public
node-version: '20' # adjust to your Node.js version
- name: Install dependencies
run: npm install
- name: Run tests # optional, add if you have tests to run
run: npm test
- name: Publish to npm
run: npm publish --access public # adjust --access as needed for public/private packages
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 5f30ba8

Please sign in to comment.