Skip to content

Commit

Permalink
Merge pull request #5 from EscolaLMS/feat/WELLMS-427/publish-to-npm
Browse files Browse the repository at this point in the history
feat: publish to npm workflow WELLMS-427
  • Loading branch information
qunabu committed Jan 3, 2024
2 parents 67379f0 + ae50488 commit b087fee
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/generate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

name: Publish package to npmjs
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: 'master'
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v2
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: git config --global user.email "github@escolalms.com" && git config --global user.name "Github"
- run: npm i
- run: npm run build
- run: npm version ${{github.ref_name}}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: git push

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "traverse-markdown-editor",
"name": "@escolalms/markdown-editor",
"description": "A rich text editor with Markdown shortcuts",
"version": "11.7.45",
"private": false,
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"license": "BSD-3-Clause",
Expand Down Expand Up @@ -111,7 +112,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/dominiczy/traverse-markdown-editor.git"
"url": "git+https://github.com/EscolaLMS/markdown-editor.git"
},
"keywords": [
"editor",
Expand All @@ -121,7 +122,7 @@
],
"author": "Tom Moor <tom.moor@gmail.com>",
"bugs": {
"url": "https://github.com/dominiczy/traverse-markdown-editor/issues"
"url": "https://github.com/EscolaLMS/markdown-editor/issues"
},
"homepage": "https://github.com/dominiczy/traverse-markdown-editor#readme"
"homepage": "https://github.com/EscolaLMS/markdown-editor#readme"
}

0 comments on commit b087fee

Please sign in to comment.