From ef6cc0a53e931f96507c666a6c34ac66abe9bb51 Mon Sep 17 00:00:00 2001 From: abhinav-from-contentstack <63039365+abhinav-from-contentstack@users.noreply.github.com> Date: Mon, 9 Jan 2023 16:48:31 +0530 Subject: [PATCH] Create release.yml --- .github/workflows/release.yml | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 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..1d93bed --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,54 @@ +name: Release +on: + push: + branches: + - master +jobs: + build: + name: Build and upload + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 16 + - name: Install dependencies + run: npm install + - name: Build + run: npm run prepack + - name: Upload dist + uses: actions/upload-artifact@v3 + with: + name: lib + path: lib + + release: + name: Download dist and release + runs-on: ubuntu-latest + needs: build + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 16 + - name: Install dependencies + run: npm install + - name: Download dist + uses: actions/download-artifact@v3 + with: + name: lib + path: lib + - name: Display dirs + run: ls -R + - name: Release + uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }}