diff --git a/.github/workflows/npm_publish.yml b/.github/workflows/npm_publish.yml new file mode 100644 index 0000000..b3f7f56 --- /dev/null +++ b/.github/workflows/npm_publish.yml @@ -0,0 +1,33 @@ +# 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: "NPM Publish" + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + # - run: npm ci + # - run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://registry.npmjs.org/ + # - run: npm ci + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.npm_access_token}} \ No newline at end of file diff --git a/package.json b/package.json index 53918b1..1b87b47 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ralphwetzel/node-red-context-monitor", - "version": "0.0.1", + "version": "1.0.0", "description": "A Node-RED node to monitor a context.", "main": "monitor.js", "scripts": {