From 2cdb9b2d22c0f8e9bdc648cf176b404ae0476725 Mon Sep 17 00:00:00 2001 From: Gaurav Koley Date: Tue, 19 Nov 2019 12:06:45 +0530 Subject: [PATCH] Create publish.yml Auto Publish --- .github/workflows/publish.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..1d43f52 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,23 @@ +name: Publish + +on: + release: + types: [published] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Install dependencies + run: npm install + - name: Build + run: npm run build + - name: Create .npmrc + run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Publish + run: npm publish --new-version ${GITHUB_REF#"refs/tags/"} --no-git-tag-version