From d167fb9266de08d4c6c54169e531dd62a4b20617 Mon Sep 17 00:00:00 2001 From: Adhiraj Dutta Date: Thu, 13 Jun 2024 17:55:10 +0530 Subject: [PATCH] feat: setup gh actions (#8) --- .github/workflows/beta.yml | 24 ++++++++++++++++++++++++ .github/workflows/build.yml | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/beta.yml create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml new file mode 100644 index 0000000..856c137 --- /dev/null +++ b/.github/workflows/beta.yml @@ -0,0 +1,24 @@ +name: Publish to npm + +on: + push: + branches: + - dev +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: install pnpm + uses: pnpm/action-setup@v4 + - name: use node.js + uses: actions/setup-node@v4 + with: + cache: "pnpm" + registry-url: "https://registry.npmjs.org" + - name: install dependencies + run: pnpm install + - name: build and publish + run: pnpm pub:beta + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..80cdbf8 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,24 @@ +name: Publish to npm + +on: + push: + branches: + - main +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: install pnpm + uses: pnpm/action-setup@v4 + - name: use node.js + uses: actions/setup-node@v4 + with: + cache: "pnpm" + registry-url: "https://registry.npmjs.org" + - name: install dependencies + run: pnpm install + - name: build and publish + run: pnpm pub + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}