From 45c749286ed34a0fcb9441133d15ec0b6aaa4160 Mon Sep 17 00:00:00 2001 From: mashal-m Date: Fri, 24 Feb 2023 23:16:44 +0500 Subject: [PATCH] refactor: only new package config --- .github/workflows/ci.yml | 44 ++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2749919..a83d8dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,31 +22,23 @@ jobs: outputs: new-release-published: ${{ steps.get-next-version.outputs.new-release-published }} new-release-version: ${{ steps.get-next-version.outputs.new-release-version }} - tests: + build: runs-on: ubuntu-latest - strategy: - matrix: - node: [16] + needs: next-version + if: needs.get-next-version.outputs.new-release-published == 'true' steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Setup Nodejs - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node }} - - name: Install dependencies - run: npm ci - - name: Validate package-lock.json changes - run: make validate-no-uncommitted-package-lock-changes - - name: Lint - run: npm run lint - - name: Test - run: npm run test - - name: Build - run: npm run build - - name: i18n_extract - run: npm run i18n_extract - - name: Coverage - uses: codecov/codecov-action@v3 + - uses: actions/checkout@v3 + - run: echo "The new release version is ${{ needs.get-next-version.outputs.new-release-version }}" + + release: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm ci + - run: npx semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}