Skip to content

Commit eb7b8fd

Browse files
authored
Merge pull request #446 from layer5io/431-single-pkg
refactor: change to single package repo
2 parents 2e5995f + f8a4e38 commit eb7b8fd

547 files changed

Lines changed: 35899 additions & 27587 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/release-drafter.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ categories:
1515
- 'kind/chore'
1616
- 'chore'
1717
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
18+
version-resolver:
19+
major:
20+
labels:
21+
- "major"
22+
minor:
23+
labels:
24+
- "minor"
25+
patch:
26+
labels:
27+
- "patch"
28+
default: patch
1829
template: |
1930
## What's New
2031
$CHANGES

.github/workflows/checks.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,25 @@ jobs:
1111
node-version: [16, 18, 20]
1212
steps:
1313
- name: Checkout Repo
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515

1616
- name: Setup Node.js ${{ matrix.node-version }}
17-
uses: actions/setup-node@v3
17+
uses: actions/setup-node@v4
1818
with:
1919
node-version: ${{ matrix.node-version }}
2020

2121
- name: Setup and install deps
2222
run: |
23-
yarn install
23+
npm install
2424
2525
- name: Prettier check
2626
run: |
27-
yarn format:check
27+
npm run format:check
2828
2929
- name: Build
3030
run: |
31-
yarn run build-all
31+
npm run build
32+
33+
- name: Test
34+
run: |
35+
npm run test

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
node-version: ${{ matrix.node-version }}
2626

2727
- name: Install dependencies
28-
run: yarn install
28+
run: npm install
2929

3030
- name: Run Lint
31-
run: yarn lint
31+
run: npm run lint

.github/workflows/pre-release.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 40 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,45 @@
1-
name: Version and Publish to NPM
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
23

3-
on:
4-
workflow_dispatch:
5-
inputs:
6-
version:
7-
description: 'Specify the version type (path, minor, major)'
8-
required: true
9-
default: 'patch'
4+
name: Publish Node.js Package
105

11-
jobs:
12-
build:
13-
name: Build
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: Checkout Repo
17-
uses: actions/checkout@v4
18-
with:
19-
fetch-depth: 0
20-
token: ${{ secrets.RELEASEDRAFTER_PAT }}
21-
ref: 'master'
22-
23-
- name: Setup Node.js 18.x
24-
uses: actions/setup-node@v3
25-
with:
26-
node-version: 18
27-
registry-url: "https://registry.npmjs.org"
28-
scope: "@layer5"
6+
on:
7+
release:
8+
types: [published]
9+
workflow_dispatch:
10+
inputs:
11+
release-version:
12+
required: true
2913

30-
- name: Install deps and build
31-
run: |
32-
yarn
33-
yarn build-all
34-
35-
- name: Initialize the NPM config
36-
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
37-
env:
38-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
39-
GITHUB_AUTH: ${{ secrets.GH_TOKEN }}
40-
41-
- name: Initialize Git User
42-
run: |
43-
git config user.name "${{ github.actor }}"
44-
git config user.email "${{ github.actor}}@users.noreply.github.com"
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
token: ${{secrets.GH_TOKEN}}
4521

46-
- name: Identify changed packages
47-
id: changed-packages
48-
run: |
49-
echo "Changed packages: $(yarn lerna changed --json | jq -r '.[].name')"
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: 18
25+
- run: |
26+
npm install
5027
51-
- name: Check if there are changed packages
52-
run: |
53-
echo "Changed packages: ${{ steps.changed-packages.outputs.changed-packages }}"
54-
if: steps.changed-packages.outputs.changed-packages != ''
55-
56-
- name: Version packages
57-
run: |
58-
if [ "${{ github.event.inputs.version }}" != 'none' ]; then
59-
./scripts/version-release.sh "${{ steps.changed-packages.outputs.changed-packages }}"
60-
else
61-
echo "Skipping versioning based on input."
62-
fi
63-
64-
- name: Use git-auto-commit-action
65-
uses: stefanzweifel/git-auto-commit-action@v5
66-
with:
67-
commit_message: 'chore: publish'
68-
commit_user_name: l5io
69-
commit_user_email: ci@layer5.io
70-
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
71-
commit_options: '--signoff'
72-
73-
- name: Create Git tags
74-
run: ./scripts/create-multiple-git-tag.sh
75-
76-
- name: Publish packages
77-
run: make publish-ci
78-
env:
79-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
80-
GITHUB_AUTH: ${{ secrets.GH_TOKEN }}
81-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
82-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
28+
publish-gpr:
29+
needs: build
30+
runs-on: ubuntu-latest
31+
permissions:
32+
contents: read
33+
packages: write
34+
steps:
35+
- uses: actions/checkout@v4
36+
with:
37+
token: ${{secrets.GH_TOKEN}}
38+
- uses: actions/setup-node@v3
39+
with:
40+
node-version: 18
41+
registry-url: "https://registry.npmjs.org"
42+
scope: "@layer5"
43+
- run: npm publish --verbose
44+
env:
45+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/storybook-deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ jobs:
2525
node-version: ${{ matrix.node-version }}
2626

2727
- name: Install dependencies
28-
run: yarn install
28+
run: npm install
2929

3030
- name: Build Storybook
3131
run: |
3232
cd apps/design-system
33-
yarn install
34-
yarn build-storybook
33+
npm install
34+
npm build-storybook
3535
3636
- name: Deploy Storybook
3737
uses: peaceiris/actions-gh-pages@v3

.gitignore

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,7 @@ dist/**
2525
packages/dist/**
2626
packages/design-system/node_modules/**
2727

28-
.yarn/*
29-
.yarn/cache
30-
!.yarn/patches
31-
!.yarn/plugins
32-
!.yarn/releases
33-
!.yarn/sdks
34-
!.yarn/versions
35-
3628
**/storybook-static/**
37-
lerna-debug.log
3829
pub.sh
3930
.eslintcache
4031

.husky/commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
yarn commitlint --edit ${1}
4+
npx commitlint --edit ${1}

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Lines changed: 0 additions & 28 deletions
This file was deleted.

.yarn/releases/yarn-3.6.3.cjs

Lines changed: 0 additions & 874 deletions
This file was deleted.

0 commit comments

Comments
 (0)