From e357f5115ce7340a068246ccb5d0e97ed1f50e0a Mon Sep 17 00:00:00 2001 From: Dimasik Kolezhniuk Date: Mon, 15 Apr 2024 15:47:27 +0200 Subject: [PATCH] Add publish package ci workflow --- .github/workflows/npm-publish.yml | 21 +++++++++++++++++++++ .nvmrc | 1 + 2 files changed, 22 insertions(+) create mode 100644 .github/workflows/npm-publish.yml create mode 100644 .nvmrc diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..77fc784 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,21 @@ +name: Publish package to NPM + +on: + release: + types: [created] + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + registry-url: https://registry.npmjs.org/ + cache: 'npm' + - run: npm ci + - run: npm run build + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.IDEN3_CIRCOM_NPM_PUBLISH_TOKEN}} diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..ee09fac --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v20.11.1