Skip to content

Commit

Permalink
refactor: create multiple packages for common, infra, and ui
Browse files Browse the repository at this point in the history
  • Loading branch information
bestickley committed Feb 14, 2022
1 parent cd96171 commit c7c6992
Show file tree
Hide file tree
Showing 170 changed files with 1,901 additions and 13,355 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
"ignore": ["gboost-docs"]
}
7 changes: 7 additions & 0 deletions .changeset/long-olives-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"gboost": minor
---

- Change top level back-end folder to infra
- Change top level front-end folder to ui
- Update to new package names: gboost-common, gboost-infra, gboost-ui
5 changes: 5 additions & 0 deletions .changeset/long-olives-campa.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gboost-common": minor
---

Initial release
5 changes: 5 additions & 0 deletions .changeset/long-olives-campb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gboost-infra": minor
---

Initial release
5 changes: 5 additions & 0 deletions .changeset/long-olives-campc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gboost-ui": minor
---

Initial release
28 changes: 28 additions & 0 deletions .github/actions/download-artifacts/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Download Artifacts
description: Download package artifacts
runs:
using: composite
steps:
- name: Download gboost build artifact
uses: actions/download-artifact@v2
with:
name: gboost-build-artifact
path: packages/gboost/lib

- name: Download gboost-infra build artifact
uses: actions/download-artifact@v2
with:
name: gboost-infra-build-artifact
path: packages/gboost-infra/lib

- name: Download gboost-ui build artifact
uses: actions/download-artifact@v2
with:
name: gboost-ui-build-artifact
path: packages/gboost-ui/lib

- name: Download gboost-common build artifact
uses: actions/download-artifact@v2
with:
name: gboost-common-build-artifact
path: packages/gboost-common/lib
File renamed without changes.
28 changes: 28 additions & 0 deletions .github/actions/upload-artifacts/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Install
description: Install PNPM, Node.js, and dependencies
runs:
using: composite
steps:
- name: Upload gboost build artifact
uses: actions/upload-artifact@v2
with:
name: gboost-build-artifact
path: packages/gboost/lib

- name: Upload gboost-infra build artifact
uses: actions/upload-artifact@v2
with:
name: gboost-infra-build-artifact
path: packages/gboost-infra/lib

- name: Upload gboost-ui build artifact
uses: actions/upload-artifact@v2
with:
name: gboost-ui-build-artifact
path: packages/gboost-ui/lib

- name: Upload gboost-common build artifact
uses: actions/upload-artifact@v2
with:
name: gboost-common-build-artifact
path: packages/gboost-common/lib
20 changes: 0 additions & 20 deletions .github/workflows/audit.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/build.yaml

This file was deleted.

63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI

on:
push:
branches: [main]

jobs:
audit:
name: Audit
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Install PNPM
uses: pnpm/action-setup@v2.1.0
with:
version: 6

- name: Audit Dependencies
run: pnpm audit --prod --audit-level critical # TODO: lower this

build:
name: Build
needs: [audit]
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Install
uses: ./.github/actions/install

- name: Compile TypeScript
run: pnpm build

lint:
name: Lint
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Install
uses: ./.github/actions/install

- name: Lint
run: pnpm lint

unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Install
uses: ./.github/actions/install

- name: Test
run: pnpm unit-test
18 changes: 0 additions & 18 deletions .github/workflows/lint.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
paths:
- docs/**
- .github/workflows/pages-deploy.yaml
- .github/workflows/pages-test-deploy.yaml

jobs:
deploy:
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Publish

on:
push:
branches:
- main
paths:
- packages/**
- .github/workflows/release.yaml

jobs:
build:
name: Build
uses: ./.github/workflows/build.yml

publish:
name: Publish
needs: [build]
runs-on: ubuntu-latest
environment: release
steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Install
uses: ./.github/actions/install

- name: Compile TypeScript
run: pnpm build

# This step will create or update the PR, "Package Versions". When that
# PR is merged, it will release to NPM. Maintainers should ensure PR is
# passing all checks before merging PR since audit, lint, test doesn't run
# in this workflow
- name: Create or Update PR or Release to NPM
uses: changesets/action@v1
with:
# pnpm changeset version will update package version which makes
# pnpm-lock.yaml out of date with packages resulting in a failed
# install for pnpm install in a CI environment (which uses)
# --frozen-lockfile by default. Therefore, we need to use
# --no-frozen-lockfile and also add changes so they can be committed
# by publish command
# https://github.com/pnpm/pnpm/issues/3664
version: pnpm changeset version && pnpm install --no-frozen-lockfile && git add .
# publish command will only run upon merge of PR created by changesets.
# publish doesn't run on every push to main
publish: pnpm changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
19 changes: 0 additions & 19 deletions .github/workflows/pull-request.yaml

This file was deleted.

76 changes: 0 additions & 76 deletions .github/workflows/release.yaml

This file was deleted.

Loading

0 comments on commit c7c6992

Please sign in to comment.