From 65d0963f429baa06b21927e8514f939975dfb6ce Mon Sep 17 00:00:00 2001 From: mhrastegari Date: Tue, 23 Sep 2025 17:37:06 +0330 Subject: [PATCH 1/2] add Flare CD --- .github/workflows/cd.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..c8268ed --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,33 @@ +name: CD + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 23 + + - name: Install dependencies + run: npm install + + - name: Build project + run: npm run build + + - name: Run tests + run: npm test + + - name: Publish to npm + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From aedb9cfc5356af9a59f45859ffd3894f857d3758 Mon Sep 17 00:00:00 2001 From: mhrastegari Date: Tue, 23 Sep 2025 21:13:25 +0330 Subject: [PATCH 2/2] apply code review --- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c8268ed..f126070 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: 23 + node-version: 'lts/*' - name: Install dependencies run: npm install diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ed003e..e75b805 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: 23 + node-version: 'lts/*' - name: Install dependencies run: npm install