diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 000000000..aba4dbd22 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,31 @@ +name: publish + +on: + release: + types: [published, edited] + +jobs: + release: + name: publish + runs-on: ubuntu-latest + + steps: + - name: Begin CI... + uses: actions/checkout@v2 + + - name: Use Node 16 + uses: actions/setup-node@v1 + with: + node-version: 16.x + registry-url: https://npm.pkg.github.com/ + + - name: NPM Publish + run: | + if [ -e package-lock.json ]; then + npm ci + else + npm i + fi + npm run build && npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/package.json b/package.json index 6338bd7ed..3f26d5e10 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "react-trello", + "name": "@ObeoNetwork/react-trello", "version": "2.4.1", "description": "Pluggable components to add a trello like kanban board to your application", "main": "dist/index.js", @@ -21,9 +21,9 @@ "format": "pretty-quick \"src/**/*.js\"", "size": "size-limit" }, - "repository": { - "type": "git", - "url": "https://github.com/rcdexta/react-trello" + "repository": "@ObeoNetwork/react-trello", + "publishConfig": { + "registry": "https://npm.pkg.github.com/" }, "keywords": [ "react", @@ -32,10 +32,6 @@ ], "author": "RC, Prakash", "license": "MIT", - "bugs": { - "url": "https://github.com/rcdexta/react-trello/issues" - }, - "homepage": "https://github.com/rcdexta/react-trello", "dependencies": { "autosize": "^4.0.2", "classnames": "^2.2.6",