diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 5397498..d3ec19b 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -5,45 +5,13 @@ on: [push, pull_request] jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20.x] steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - registry-url: https://registry.npmjs.org/ - - - uses: pnpm/action-setup@v3 - name: Install pnpm - with: - version: 8 - run_install: false - - - name: Environment log - id: env - run: | - node --version - pnpm --version - - - name: Install dependencies - run: | - pnpm install --frozen-lockfile - - - name: Run build process - run: | - pnpm build - - - name: Run testing - run: | - pnpm test - pnpm test:build - - - name: Upload test coverage - uses: codecov/codecov-action@v3 + - name: Run CI/CD Pipeline + uses: zource-dev/action@v1 with: - token: ${{ secrets.CODECOV_TOKEN }} + node_version: '20.x' + github_token: ${{ secrets.GITHUB_TOKEN }} + codecov_token: ${{ secrets.CODECOV_TOKEN }} + test: | + pnpm test + pnpm test:build diff --git a/.github/workflows/upgrade.yml b/.github/workflows/upgrade.yml index 68054e3..0e2f1df 100644 --- a/.github/workflows/upgrade.yml +++ b/.github/workflows/upgrade.yml @@ -8,72 +8,17 @@ on: jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20.x] steps: - - name: Checkout code ๐Ÿ›Ž๏ธ - uses: actions/checkout@v3 - - - name: Use Node.js ${{ matrix.node-version }} ๐ŸŸข - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - registry-url: https://registry.npmjs.org/ - - - name: Install pnpm โš™๏ธ - uses: pnpm/action-setup@v3 + - name: Run CI/CD Pipeline + uses: zource-dev/action@v1 with: - version: 8 - run_install: false - - - name: Environment log โš™๏ธ - id: env - run: | - node --version - pnpm --version - - - name: Install dependencies ๐Ÿ”ง - run: | - pnpm install --frozen-lockfile - - - name: Upgrade ๐ŸŒ  - id: updates - run: | - PENDING=$(pnpm outdated --json|jq length) - echo "::set-output name=PENDING::$PENDING" - pnpm up --latest - DONE=$(pnpm outdated --json|jq length) - echo "::set-output name=DONE::$DONE" - - - name: Build process ๐Ÿงฑ - if: steps.updates.outputs.PENDING != steps.updates.outputs.DONE - run: | - pnpm build - - - name: Test ๐Ÿงช - if: steps.updates.outputs.PENDING != steps.updates.outputs.DONE - run: | - pnpm test - pnpm test:build - - - name: Commit ๐Ÿ”’ - if: steps.updates.outputs.PENDING != steps.updates.outputs.DONE - run: | - git config --global user.email "3axap4eHko@github.com" - git config --global user.name "Ivan Zakharchanka" - git add --all - git commit -am "autoupdate" - npm version patch - - - name: Push - if: steps.updates.outputs.PENDING != steps.updates.outputs.DONE - run: | - git push - git push --tags - - - name: Publish ๐Ÿ“š - if: steps.updates.outputs.PENDING != steps.updates.outputs.DONE - run: | - echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc - npm publish + node_version: '20.x' + github_token: ${{ secrets.GITHUB_TOKEN }} + autoupdate: minor + username: Ivan Zakharchanka + email: 3axap4eHko@github.com + npm_token: ${{ secrets.NPM_TOKEN }} + codecov_token: ${{ secrets.CODECOV_TOKEN }} + test: | + pnpm lint + pnpm test