From 9e7221bd28ad93431a473e41f3b8774c13113c91 Mon Sep 17 00:00:00 2001 From: Tushar Mathur Date: Mon, 9 Jan 2023 11:01:25 +0530 Subject: [PATCH] chore: update workflow --- .github/workflows/Release.yml | 25 +++++++++++++++++++++++++ .github/workflows/publish.yml | 26 -------------------------- 2 files changed, 25 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/Release.yml delete mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml new file mode 100644 index 0000000..edba546 --- /dev/null +++ b/.github/workflows/Release.yml @@ -0,0 +1,25 @@ +name: Release +on: + push: + branches: + - master +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: "lts/*" + - name: Install dependencies + run: npm ci + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 280ce51..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,26 +0,0 @@ -# This workflow will publish a package to GitHub Packages when a release is created -# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages - -name: Publish - -on: - push: - branches: ['master'] - workflow_run: - workflows: ["Build and Test"] - types: - - completed - -jobs: - publish-npm: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm run semantic-release - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}}