Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blui-ci workflow #103

Merged
merged 6 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
43 changes: 0 additions & 43 deletions .circleci/config.yml

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/blui-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
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
- 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
**/**/node_modules
.idea/
**/**/.DS_Store
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
4 changes: 2 additions & 2 deletions eslint-config/PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`).
Expand All @@ -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.
4 changes: 2 additions & 2 deletions prettier-config/PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.