From 8954b2787166bd6cb0acad3c30f9146186aed3dc Mon Sep 17 00:00:00 2001 From: Semen Bobrov Date: Tue, 10 Dec 2024 10:31:57 +0100 Subject: [PATCH] chore: add ci --- .github/workflows/ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d3ebfe0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +name: Build and publish +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '20' + + - name: Install dependencies + run: npm install + + - name: Run lint + run: npm run lint + + - name: Run tests + run: npm run coverage + + - name: Build project + run: npm run build + + # release: + # needs: build + # runs-on: ubuntu-latest + # steps: + # - name: Checkout code + # uses: actions/checkout@v2 + + # - name: Set up Node.js + # uses: actions/setup-node@v2 + # with: + # node-version: '20' + + # - name: Install dependencies + # run: npm install + + # - name: Semantic Release + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + # run: npx semantic-release