From 55dc78b15e480c077549dda0e1d6dec08b3eff2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ademi=CC=81lson=20F=2E=20Tonato?= Date: Fri, 27 May 2022 18:23:00 +0100 Subject: [PATCH] chore: add npm publish action --- .github/workflows/npm-publish.yml | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..42bc41e --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,32 @@ +name: npm publish + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + - run: npm ci + - run: npm run build --if-present + - run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm run build --if-present + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}}