From 8c08299afa46a9574676c25476e8ebbb2f4e042d Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Mon, 13 May 2024 14:57:39 -0400 Subject: [PATCH 1/6] Add blui-ci workflow --- .DS_Store | Bin 0 -> 6148 bytes .circleci/config.yml | 43 ------------------- .github/workflows/blui-ci.yml | 75 ++++++++++++++++++++++++++++++++++ eslint-config/PUBLISHING.md | 4 +- prettier-config/PUBLISHING.md | 4 +- 5 files changed, 79 insertions(+), 47 deletions(-) create mode 100644 .DS_Store delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/blui-ci.yml diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..aade74b9bf5897794df67f982c1535d2f4b81533 GIT binary patch literal 6148 zcmeHKF=_)r43rWV4sKk!+!qA$gT>e{@CQQd6oCUnLi(%nE9;kaXOgS{hu9KI&ie<#R&vS)Ja^EZD# zyd94Nk7ZIo3P=GdAO)nr6&0xFI$vDzPF*Dhq`-YB!0$tY6MNy97@rP=7y*DYq{Fa| zSpwLY0QSN$5gC{#6_`}75yO*?e5<-%I3_0DyoL|2CwomO9#6;pEy~S%qM{U#0+$Lr z=61>czlHxZ|6h`{lLAuUt`zXuX17`6m8!Q+UXH!C!C&F5Il*aI2L&P8F)-ROHf+bM cD9XCVHO_nCm>6{AgAUZs0CkZ`fm ~/.npmrc - echo "//registry.yarnpkg.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc - - run: - name: Publish @brightlayer-ui/prettier-config - command: cd prettier-config && yarn publish:package -b $CIRCLE_BRANCH - - run: - name: Publish @brightlayer-ui/eslint-config - command: cd eslint-config && yarn publish:package -b $CIRCLE_BRANCH - -workflows: - version: 2 - code_standards: - jobs: - - build - - publish: - requires: - - build - filters: - branches: - only: - - master - - dev diff --git a/.github/workflows/blui-ci.yml b/.github/workflows/blui-ci.yml new file mode 100644 index 0000000..daf1470 --- /dev/null +++ b/.github/workflows/blui-ci.yml @@ -0,0 +1,75 @@ +name: Build + +on: + push: + branches: [ "dev", "master" ] + pull_request: + branches: [ "dev", "master" ] + pull_request_target: + types: + - opened + branches: + - '*/*' + +permissions: + pull-requests: write + contents: read + +jobs: + verify_artifacts: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + - run: yarn test + working-directory: eslint-config + - run: yarn test + working-directory: prettier-config + + publish_prettier_config: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev') }} + needs: verify_artifacts + strategy: + matrix: + node-version: [20.x] + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + BRANCH: ${{ github.ref == 'refs/heads/master' && 'master' || 'dev' }} + steps: + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + registry-url: 'https://registry.npmjs.org' + - run: yarn --immutable + - run: npm run publish:package -b ${{env.BRANCH}} + working-directory: prettier-config + + publish_eslint_config: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev') }} + needs: verify_artifacts + strategy: + matrix: + node-version: [20.x] + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + BRANCH: ${{ github.ref == 'refs/heads/master' && 'master' || 'dev' }} + steps: + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + registry-url: 'https://registry.npmjs.org' + - run: yarn --immutable + - run: npm run publish:package -b ${{env.BRANCH}} + working-directory: eslint-config \ No newline at end of file diff --git a/eslint-config/PUBLISHING.md b/eslint-config/PUBLISHING.md index fefd09f..1015709 100644 --- a/eslint-config/PUBLISHING.md +++ b/eslint-config/PUBLISHING.md @@ -2,7 +2,7 @@ ## Automatic Publishing -This package is published to NPM automatically by CircleCI when code is merged into the `dev` or `master` branches. To publish a new version, simply update the version in `package.json` and merge your code into the appropriate branch. +This package is published to NPM automatically by Github when code is merged into the `dev` or `master` branches. To publish a new version, simply update the version in `package.json` and merge your code into the appropriate branch. - The `dev` branch will publish versions marked as `alpha` or `beta`. - The `master` branch will publish any version (`alpha`, `beta`, or `latest`). @@ -25,4 +25,4 @@ For this command to work, you must have an NPM token configured in your environm npm adduser && yarn publish:package ``` -> Publishing manually should only be done for `alpha` or `beta` packages. The command will work for `latest` packages, but this should be avoided except in rare situations where the automatic publishing functionality is not working in CircleCI. +> Publishing manually should only be done for `alpha` or `beta` packages. The command will work for `latest` packages, but this should be avoided except in rare situations where the automatic publishing functionality is not working in Github. diff --git a/prettier-config/PUBLISHING.md b/prettier-config/PUBLISHING.md index 510a14c..e05b4d8 100644 --- a/prettier-config/PUBLISHING.md +++ b/prettier-config/PUBLISHING.md @@ -2,7 +2,7 @@ ## Automatic Publishing -This package is published to NPM automatically by CircleCI when code is merged into the `dev` or `master` branches. To publish a new version, simply update the version in `package.json` and merge your code into the appropriate branch. +This package is published to NPM automatically by Github when code is merged into the `dev` or `master` branches. To publish a new version, simply update the version in `package.json` and merge your code into the appropriate branch. - The `dev` branch will publish versions marked as `alpha` or `beta`. - The `master` branch will publish any version (`alpha`, `beta`, or `latest`). In both cases, the code will only be published if the version number differs from the current version published under the respective dist tag. @@ -23,4 +23,4 @@ For this command to work, you must have an NPM token configured in your environm npm adduser && yarn publish:package ``` -> Publishing manually should only be done for `alpha` or `beta` packages. The command will work for `latest` packages, but this should be avoided except in rare situations where the automatic publishing functionality is not working in CircleCI. +> Publishing manually should only be done for `alpha` or `beta` packages. The command will work for `latest` packages, but this should be avoided except in rare situations where the automatic publishing functionality is not working in Github. From b95d4f058bbbd1e5e4c9346a8e702d0a73620896 Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Mon, 13 May 2024 15:05:05 -0400 Subject: [PATCH 2/6] skip node --- .github/workflows/blui-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/blui-ci.yml b/.github/workflows/blui-ci.yml index daf1470..9d97be9 100644 --- a/.github/workflows/blui-ci.yml +++ b/.github/workflows/blui-ci.yml @@ -26,11 +26,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'yarn' + # - name: Use Node.js ${{ matrix.node-version }} + # uses: actions/setup-node@v4 + # with: + # node-version: ${{ matrix.node-version }} + # cache: 'yarn' - run: yarn test working-directory: eslint-config - run: yarn test From d0cc11d26d80bd0e1c30dbc0dfe40b3b8adc63ed Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Mon, 13 May 2024 15:06:25 -0400 Subject: [PATCH 3/6] remove setup node --- .github/workflows/blui-ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/blui-ci.yml b/.github/workflows/blui-ci.yml index 9d97be9..607c136 100644 --- a/.github/workflows/blui-ci.yml +++ b/.github/workflows/blui-ci.yml @@ -26,11 +26,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - # - name: Use Node.js ${{ matrix.node-version }} - # uses: actions/setup-node@v4 - # with: - # node-version: ${{ matrix.node-version }} - # cache: 'yarn' - run: yarn test working-directory: eslint-config - run: yarn test From d5d7b1d5f3ce5d5547e5c8451a0338ed8a98d3a4 Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Mon, 13 May 2024 15:17:08 -0400 Subject: [PATCH 4/6] add build badge --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b5d5bf..c8c0463 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Brightlayer UI Code Standards [![](https://img.shields.io/npm/v/@brightlayer-ui/eslint-config?label=%40brightlayer-ui%2Feslint-config&style=flat)](https://www.npmjs.com/package/@brightlayer-ui/eslint-config) -[![](https://img.shields.io/npm/v/@brightlayer-ui/prettier-config?label=%40brightlayer-ui%2Fprettier-config&style=flat)](https://www.npmjs.com/package/@brightlayer-ui/prettier-config) +[![](https://img.shields.io/npm/v/@brightlayer-ui/prettier-config?label=%40brightlayer-ui%2Fprettier-config&style=flat)](https://www.npmjs.com/package/@brightlayer-ui/prettier-config) +[![Build](https://github.com/etn-ccis/blui-code-standards/actions/workflows/blui-ci.yml/badge.svg?branch=master)](https://github.com/etn-ccis/blui-code-standards/actions/workflows/blui-ci.yml) This repository contains resources for ensuring consistency and quality across different Brightlayer UI applications and materials. From ea3e7c4685090a52f6550477fa0134b4412cec42 Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Tue, 14 May 2024 08:05:12 -0400 Subject: [PATCH 5/6] ignore DS Store --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 33a0b39..23afd54 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ **/**/node_modules .idea/ +**/**/.DS_Store From 87faa2e34ee6f86a08be074f7d54005728aeafa7 Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Tue, 14 May 2024 10:11:25 -0400 Subject: [PATCH 6/6] update pub --- .DS_Store | Bin 6148 -> 6148 bytes .github/workflows/blui-ci.yml | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.DS_Store b/.DS_Store index aade74b9bf5897794df67f982c1535d2f4b81533..eb220b5cf38cd8b3fbfdf302adf59f2d8f1c32ef 100644 GIT binary patch delta 98 zcmZoMXfc=|&e%S&P;8=}A|vy}0Ba!8qol*apvRETkjYSzQk