Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub workflow for npm publish #13

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
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
27 changes: 27 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow will publish a package to NPM Packages when a release is created
# For more information see: https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-nodejs-packages

name: Publish Package to npmjs

on:
release:
types: [published]

env:
NODE: 18

jobs:
publish-npm:
if: github.repository == 'hyva-themes/hyva-modules-tailwind-js'
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE }}'
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
28 changes: 17 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
{
"name": "@hyva-themes/hyva-modules",
"version": "1.0.10",
"description": "Hyvä-themes TailwindCSS utility functions",
"homepage": "https://hyva.io",
"repository": {
"type": "git",
"url": "https://github.com/hyva-themes/hyva-modules-tailwind-js.git"
},
"bugs": {
"url": "https://github.com/hyva-themes/hyva-modules-tailwind-js/issues",
"email": "info@hyva.io"
},
"description": "Hyvä-themes TailwindCSS utility functions",
"license": "BSD-3-Clause",
"main": "src/index.js",
"engines": {
"node": ">=14.0.0"
},
"keywords": [
"hyva",
"magento2",
"tailwindcss"
],
"scripts": {
"test": "jest"
},
"license": "BSD-3-Clause",
"repository": {
"type": "git",
"url": "https://github.com/hyva-themes/hyva-modules-tailwind-js.git"
},
"devDependencies": {
"jest": "^27.5.1"
},
"dependencies": {
"deepmerge": "^4.2.2"
},
"engines" : {
"node" : ">=12.13.0"
"devDependencies": {
"jest": "^27.5.1"
}
}