diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 7b0a858..c066ac1 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -2,22 +2,21 @@ name: npm-publish on: workflow_dispatch: jobs: - npm-publish: - name: npm-publish + build: runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Publish to npm monorepo - uses: wtrocki/npm-publish-action-monorepo@2.0.0 - with: - workspace: "./" # Required - versionFrom: "./" - tag_name: "v%s" - tag_message: "v%s" - create_tag: "true" - commit_pattern: "^chore: Release (\\S+)" - publish_args: "--non-interactive --dry-run" - env: # More info about the environment variables in the README - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated - NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # You need to set this in your repo settings \ No newline at end of file + - uses: actions/checkout@v4 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + working-directory: ./node-red-contrib-c8y-client + - run: npm publish --provenance --access public + working-directory: ./node-red-contrib-c8y-client + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/node-red-contrib-c8y-client/package.json b/node-red-contrib-c8y-client/package.json index 785f8ab..e0e0261 100644 --- a/node-red-contrib-c8y-client/package.json +++ b/node-red-contrib-c8y-client/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-c8y-client", - "version": "1.0.0", + "version": "1.0.1", "description": "c8y client for Node-RED", "main": "index.js", "scripts": {