Skip to content

Publish to NPM Registry #7

Publish to NPM Registry

Publish to NPM Registry #7

name: Publish Library
run-name: Publish to NPM Registry
on: [push]
# push:
# branches:
# - master
# - develop
jobs:
Info-And-Checkout:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install and Lint
uses: actions/cache@v4
with:
path: "node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: |
yarn install --frozen-lockfile
yarn lint
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install and Test
uses: actions/cache@v4
with:
path: "node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: |
yarn install --frozen-lockfile
yarn test
# publish-npm:
# needs: build
# runs-on: ubuntu-latest
# permissions:
# id-token: write
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v3
# with:
# node-version: 20
# registry-url: 'https://registry.npmjs.org'
# - run: npm publish --provenance --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}