Skip to content

Commit

Permalink
feat: update template (#19)
Browse files Browse the repository at this point in the history
* feat: update template

Signed-off-by: donniean <donniean1@gmail.com>

* ci: add changesets

Signed-off-by: donniean <donniean1@gmail.com>

---------

Signed-off-by: donniean <donniean1@gmail.com>
  • Loading branch information
donniean authored Jul 12, 2024
1 parent de5731a commit 8929744
Show file tree
Hide file tree
Showing 14 changed files with 772 additions and 26 deletions.
14 changes: 14 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": [],
"snapshot": {
"useCalculatedVersion": true
}
}
45 changes: 45 additions & 0 deletions .github/workflows/release-packages-canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release Packages Snapshot

on:
push:
branches:
- canary
- canary-*
- canary/*
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release-packages:
name: Release
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 16

- name: Install Dependencies
run: yarn

- name: Build
run: yarn release

- name: Generate changeset
run: yarn changeset version --snapshot canary

- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish
run: yarn changeset publish --no-git-tag --tag canary
45 changes: 45 additions & 0 deletions .github/workflows/release-packages-next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release Packages Next

on:
push:
branches:
- next
- next-*
- next/*
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release-packages:
name: Release
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 16

- name: Install Dependencies
run: yarn

- name: Build
run: yarn release

- name: Generate changeset
run: yarn changeset version --snapshot next

- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish
run: yarn changeset publish --no-git-tag --tag next
38 changes: 38 additions & 0 deletions .github/workflows/release-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release Packages

on:
push:
branches:
- master
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release-packages:
name: Release
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 16

- name: Install Dependencies
run: yarn

- name: Build
run: yarn release

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
"dist"
],
"scripts": {
"changeset:add": "changeset add",
"dev": "ncc build ./index.ts -w -o dist/",
"prepublish": "yarn release",
"publish": "changeset version && changeset publish",
"prerelease": "rimraf ./dist/",
"release": "ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register"
},
Expand All @@ -41,6 +43,7 @@
"validate-npm-package-name": "3.0.0"
},
"devDependencies": {
"@changesets/cli": "^2.27.7",
"@types/async-retry": "1.4.5",
"@types/cli-progress": "3.11.0",
"@types/cross-spawn": "^6.0.2",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions template/gitignore → template/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ yarn-error.log*

*.rdb
.cache-loader

.yalc/
yalc.lock
File renamed without changes.
File renamed without changes.
8 changes: 0 additions & 8 deletions template/extensions/entry.ts

This file was deleted.

28 changes: 15 additions & 13 deletions template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,20 @@
},
"browserslist": ["> 1%", "last 2 versions", "not ie <= 8"],
"dependencies": {
"@ks-console/bootstrap": "^0.0.5",
"@ks-console/server": "^0.0.1",
"@ks-console/shared": "0.0.4",
"@kubed/charts": "^0.0.14",
"@kubed/code-editor": "^0.0.20",
"@kubed/components": "^0.0.81",
"@kubed/diff-viewer": "^0.0.15",
"@kubed/hooks": "^0.0.14",
"@kubed/icons": "^0.0.13",
"@kubed/log-viewer": "^0.0.14",
"@kubed/stook": "^0.0.4"
"@ks-console/appstore": "^4.1.1",
"@ks-console/bootstrap": "^4.1.1",
"@ks-console/console": "^4.1.1",
"@ks-console/core": "^4.1.1",
"@ks-console/locales": "^4.1.1",
"@ks-console/server": "^4.1.1",
"@ks-console/shared": "^4.1.1",
"@kubed/charts": "^0.0.22",
"@kubed/code-editor": "^0.0.27",
"@kubed/components": "^0.2.8",
"@kubed/diff-viewer": "^0.0.23",
"@kubed/hooks": "^0.0.18",
"@kubed/icons": "^0.0.20",
"@kubed/log-viewer": "^0.0.22"
},
"devDependencies": {
"@babel/cli": "^7.15.7",
Expand Down Expand Up @@ -145,7 +148,6 @@
"yargs": "^17.0.1"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
"node": ">= 16.0.0"
}
}
Loading

0 comments on commit 8929744

Please sign in to comment.