Skip to content

Commit

Permalink
Create publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaKantipudi1 authored Dec 2, 2024
1 parent edd901a commit 1174ebd
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'Publish to NPM Registry'

on:
release:
types: [published]

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Install Dependencies
run: yarn install

- name: Build Package
run: yarn prepare # Uses bob build as defined in your package.json

- name: Run Tests
run: yarn test

- name: Publish to NPM
run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 1174ebd

Please sign in to comment.