Skip to content

Commit

Permalink
Add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
seniorquico committed Aug 24, 2024
1 parent 0072141 commit 88b1b67
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish npm Package

on:
release:
types:
- published

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install Dependencies
run: npm ci
- name: Test
run: npm run test
publish:
name: Publish
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
cache-dependency-path: package-lock.json
registry-url: https://npm.pkg.github.com
scope: '@saladtechnologies-oss'
- name: Install Dependencies
run: npm ci
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 88b1b67

Please sign in to comment.