From 81e862fddcf836bfa309bc33867a9860d8403bad Mon Sep 17 00:00:00 2001 From: Mridul Sharma Date: Mon, 28 Oct 2024 15:43:01 +0530 Subject: [PATCH] chore: added new workflow to push new release as alpha release --- .github/workflows/npm-alpha-publish.yml | 53 +++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/npm-alpha-publish.yml diff --git a/.github/workflows/npm-alpha-publish.yml b/.github/workflows/npm-alpha-publish.yml new file mode 100644 index 00000000..23812216 --- /dev/null +++ b/.github/workflows/npm-alpha-publish.yml @@ -0,0 +1,53 @@ +name: Publish Alpha Version + +on: + push: + branches: + - alpha-release + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + registry-url: https://registry.npmjs.org/ + + - name: Install dependencies + run: npm ci + + - name: Publish to npm + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + npm version prerelease --preid=alpha + npm publish --tag alpha \ No newline at end of file