Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Publish to NPM

on:
release:
types: [created]
jobs:
build:
name: Build and Publish
timeout-minutes: 15
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 2

- uses: pnpm/action-setup@v2.0.1
with:
version: 6.32.2

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 16
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Publish package on NPM 📦
run: cd ./lib && pnpm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hover-design/react",
"version": "0.1.5",
"version": "0.1.6",
"description": "Hover Component library created by bunch of ants from antstack",
"license": "MIT",
"main": "dist/hover-react.es.js",
Expand Down