From 8889e5c3d9da63627a523015340446768e4eac29 Mon Sep 17 00:00:00 2001 From: Andrei Volkov Date: Sat, 21 Oct 2023 14:58:02 -0600 Subject: [PATCH] feat: separated the workflows --- .github/workflows/build-release.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/test.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/build-release.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..3644200 --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,28 @@ +name: Build and release + +on: + workflow_dispatch: + +concurrency: + group: build-and-release + cancel-in-progress: true + +jobs: + build-and-release: + runs-on: windows-latest + steps: + - name: Check out the repo + uses: actions/checkout@v4 + - name: Install Node.js and npm + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: npm + - name: Install dependencies + run: npm install + - name: Build and release the app + env: + GH_TOKEN: ${{ secrets.github_token }} + MARKETEYE_API_KEY: ${{ secrets.MARKETEYE_API_KEY }} + MARKETEYE_API_URL: ${{ secrets.MARKETEYE_API_URL }} + run: npm run package:publish diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..bf2da5e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: Test + +on: + push: + branches: + - main + +concurrency: + group: test + cancel-in-progress: true + +jobs: + test: + steps: + - name: Check out the repo + uses: actions/checkout@v4 + - name: Install Node.js and npm + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: npm + - name: Install dependencies + run: npm install + - name: Run tests + run: | + npm run package + npm run lint + npm exec tsc + npm test