From 74cbd0993a3f718e1461d550992068ec382c9768 Mon Sep 17 00:00:00 2001 From: Peyman Salehi Date: Mon, 6 Mar 2023 15:56:58 +0330 Subject: [PATCH] Using github action to publish to npmjs --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c331982 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Publish + +on: + release: + types: [published] + +env: + FORCE_COLOR: 1 + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}