Merge pull request #1096 from gradientedge/feat/add-tags-to-ignore #1996
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| name: CI-Pipeline | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| name: CI-Pipeline | |
| NODE_OPTIONS: --max_old_space_size=7168 | |
| jobs: | |
| validate: | |
| name: Build & Test Package(s) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.x, 24.x] | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Enable Corepack | |
| run: corepack enable && corepack install | |
| - name: Get pnpm store directory | |
| id: pnpm-store | |
| run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - name: Cache pnpm store | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.pnpm-store.outputs.path }} | |
| key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm- | |
| - name: Install Packages | |
| run: pnpm install --frozen-lockfile | |
| - name: Build Applications | |
| run: pnpm build | |
| - name: Test Applications | |
| run: pnpm validate | |
| - name: Validate Documentation | |
| run: pnpm run docs | |
| - name: Publish Code Coverage Report | |
| uses: codecov/codecov-action@v7 | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && success() && matrix.node-version == '24.x' }} | |
| with: | |
| slug: gradientedge/cdk-utils | |
| token: ${{ env.CODECOV_TOKEN }} | |
| - uses: actions/upload-artifact@v7 | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && success() && matrix.node-version == '24.x' }} | |
| with: | |
| name: docs-artifact | |
| path: ./api-docs/ | |
| release: | |
| name: Release Package(s) | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && success() }} | |
| runs-on: ubuntu-latest | |
| needs: [validate] | |
| strategy: | |
| matrix: | |
| node-version: [24.x] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.GIT_TOKEN }} | |
| HUSKY: 0 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Enable Corepack | |
| run: corepack enable && corepack install | |
| - name: Get pnpm store directory | |
| id: pnpm-store | |
| run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - name: Cache pnpm store | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.pnpm-store.outputs.path }} | |
| key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm- | |
| - name: Install Packages | |
| run: pnpm install --frozen-lockfile | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: docs-artifact | |
| path: ./api-docs/ | |
| - name: Build Production | |
| run: pnpm build:production | |
| - name: Create Release Pull Request or Publish | |
| uses: changesets/action@v1 | |
| with: | |
| title: 'chore: version packages' | |
| commit: 'chore: version packages' | |
| publish: pnpm release | |
| version: pnpm changeset version | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Deploy Documentation | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./api-docs | |
| - uses: geekyeggo/delete-artifact@v6 | |
| with: | |
| name: | | |
| docs-artifact | |
| failOnError: false |