Skip to content

Commit

Permalink
Merge branch 'next' of https://github.com/underctrl-io/commandkit int…
Browse files Browse the repository at this point in the history
…o next
  • Loading branch information
twlite committed Feb 2, 2024
2 parents 9ff8593 + f6244e9 commit b921af7
Show file tree
Hide file tree
Showing 132 changed files with 3,478 additions and 2,765 deletions.
60 changes: 0 additions & 60 deletions .github/workflows/deploy-dev-build.yaml

This file was deleted.

65 changes: 65 additions & 0 deletions .github/workflows/dev-commandkit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: (CommandKit) Publish Dev Build

on:
push:
branches:
- master
paths:
- 'packages/commandkit/**'

jobs:
release:
name: 🚀 Publish Dev Build
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v2
with:
version: 8

- name: 📚 Checkout
uses: actions/checkout@v3

- name: 🟢 Node
uses: actions/setup-node@v2
with:
node-version: 18
registry-url: https://registry.npmjs.org

- name: 🍳 Prepare
run: pnpm install

- name: 🔢 Update Version
run: |
cd packages/commandkit
node -e "const pkg = require('./package.json'); \
const newVersion = pkg.version + '-dev.' + new Date().toISOString().replace(/[:\-T]/g, '').substr(0,14); \
pkg.version = newVersion; \
require('fs').writeFileSync('./package.json', JSON.stringify(pkg, null, 2));"
env:
DEBIAN_FRONTEND: noninteractive

- name: 🧱 Build
run: pnpm --filter './packages/commandkit' run build

- name: 🚚 Publish
run: |
cd packages/commandkit
npm publish --access public --tag dev
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

- name: 🚫 Deprecate Previous Dev Version
run: |
PACKAGE_NAME=$(node -e "console.log(require('./packages/commandkit/package.json').name);")
ALL_VERSIONS=$(npm info $PACKAGE_NAME versions -json)
VERSION_TO_DEPRECATE=$(echo $ALL_VERSIONS | node -e "
const versions = JSON.parse(require('fs').readFileSync('/dev/stdin', 'utf-8'));
const devVersions = versions.filter(v => v.includes('-dev.'));
const versionToDeprecate = devVersions[devVersions.length - 2];
console.log(versionToDeprecate);
")
echo Deprecating version $VERSION_TO_DEPRECATE
npm deprecate $PACKAGE_NAME@$VERSION_TO_DEPRECATE "Deprecated dev version."
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
65 changes: 65 additions & 0 deletions .github/workflows/dev-create-commandkit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: (Create CommandKit) Publish Dev Build

on:
push:
branches:
- master
paths:
- 'packages/create-commandkit/**'

jobs:
release:
name: 🚀 Publish Dev Build
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v2
with:
version: 8

- name: 📚 Checkout
uses: actions/checkout@v3

- name: 🟢 Node
uses: actions/setup-node@v2
with:
node-version: 18
registry-url: https://registry.npmjs.org

- name: 🍳 Prepare
run: pnpm install

- name: 🔢 Update Version
run: |
cd packages/create-commandkit
node -e "const pkg = require('./package.json'); \
const newVersion = pkg.version + '-dev.' + new Date().toISOString().replace(/[:\-T]/g, '').substr(0,14); \
pkg.version = newVersion; \
require('fs').writeFileSync('./package.json', JSON.stringify(pkg, null, 2));"
env:
DEBIAN_FRONTEND: noninteractive

- name: 🧱 Build
run: pnpm --filter './packages/create-commandkit' run build

- name: 🚚 Publish
run: |
cd packages/create-commandkit
npm publish --access public --tag dev
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

- name: 🚫 Deprecate Previous Dev Version
run: |
PACKAGE_NAME=$(node -e "console.log(require('./packages/create-commandkit/package.json').name);")
ALL_VERSIONS=$(npm info $PACKAGE_NAME versions -json)
VERSION_TO_DEPRECATE=$(echo $ALL_VERSIONS | node -e "
const versions = JSON.parse(require('fs').readFileSync('/dev/stdin', 'utf-8'));
const devVersions = versions.filter(v => v.includes('-dev.'));
const versionToDeprecate = devVersions[devVersions.length - 2];
console.log(versionToDeprecate);
")
echo Deprecating version $VERSION_TO_DEPRECATE
npm deprecate $PACKAGE_NAME@$VERSION_TO_DEPRECATE "Deprecated dev version."
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
42 changes: 21 additions & 21 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
name: Lint

on:
push:
branches:
- '**'
push:
branches:
- '**'

jobs:
build:
name: 🔍 Lint
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v2
with:
version: 8
build:
name: 🔍 Lint
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v2
with:
version: 8

- name: 📚 Checkout
uses: actions/checkout@v3
- name: 📚 Checkout
uses: actions/checkout@v3

- name: 🟢 Node
uses: actions/setup-node@v2
with:
node-version: 16
registry-url: https://registry.npmjs.org
- name: 🟢 Node
uses: actions/setup-node@v2
with:
node-version: 16
registry-url: https://registry.npmjs.org

- name: 🍳 Prepare
run: pnpm install
- name: 🍳 Prepare
run: pnpm install

- name: ✨ Lint
run: pnpm lint
- name: ✨ Lint
run: pnpm lint
65 changes: 65 additions & 0 deletions .github/workflows/next-commandkit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: (CommandKit) Publish Next Beta Build

on:
push:
branches:
- next
paths:
- 'packages/commandkit/**'

jobs:
release:
name: 🚀 Publish Next Beta Build
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v2
with:
version: 8

- name: 📚 Checkout
uses: actions/checkout@v3

- name: 🟢 Node
uses: actions/setup-node@v2
with:
node-version: 18
registry-url: https://registry.npmjs.org

- name: 🍳 Prepare
run: pnpm install

- name: 🔢 Update Version
run: |
cd packages/commandkit
node -e "const pkg = require('./package.json'); \
const newVersion = pkg.version + '-next-beta.' + new Date().toISOString().replace(/[:\-T]/g, '').substr(0,14); \
pkg.version = newVersion; \
require('fs').writeFileSync('./package.json', JSON.stringify(pkg, null, 2));"
env:
DEBIAN_FRONTEND: noninteractive

- name: 🧱 Build
run: pnpm --filter './packages/commandkit' run build

- name: 🚚 Publish
run: |
cd packages/commandkit
npm publish --access public --tag next
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

- name: 🚫 Deprecate Previous Beta Version
run: |
PACKAGE_NAME=$(node -e "console.log(require('./packages/commandkit/package.json').name);")
ALL_VERSIONS=$(npm info $PACKAGE_NAME versions -json)
VERSION_TO_DEPRECATE=$(echo $ALL_VERSIONS | node -e "
const versions = JSON.parse(require('fs').readFileSync('/dev/stdin', 'utf-8'));
const devVersions = versions.filter(v => v.includes('-next-beta.'));
const versionToDeprecate = devVersions[devVersions.length - 2];
console.log(versionToDeprecate);
")
echo Deprecating version $VERSION_TO_DEPRECATE
npm deprecate $PACKAGE_NAME@$VERSION_TO_DEPRECATE "Deprecated beta version."
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
65 changes: 65 additions & 0 deletions .github/workflows/next-create-commandkit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: (Create CommandKit) Publish Next Beta Build

on:
push:
branches:
- next
paths:
- 'packages/create-commandkit/**'

jobs:
release:
name: 🚀 Publish Next Beta Build
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v2
with:
version: 8

- name: 📚 Checkout
uses: actions/checkout@v3

- name: 🟢 Node
uses: actions/setup-node@v2
with:
node-version: 18
registry-url: https://registry.npmjs.org

- name: 🍳 Prepare
run: pnpm install

- name: 🔢 Update Version
run: |
cd packages/create-commandkit
node -e "const pkg = require('./package.json'); \
const newVersion = pkg.version + '-next-beta.' + new Date().toISOString().replace(/[:\-T]/g, '').substr(0,14); \
pkg.version = newVersion; \
require('fs').writeFileSync('./package.json', JSON.stringify(pkg, null, 2));"
env:
DEBIAN_FRONTEND: noninteractive

- name: 🧱 Build
run: pnpm --filter './packages/create-commandkit' run build

- name: 🚚 Publish
run: |
cd packages/create-commandkit
npm publish --access public --tag next
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

- name: 🚫 Deprecate Previous Beta Version
run: |
PACKAGE_NAME=$(node -e "console.log(require('./packages/create-commandkit/package.json').name);")
ALL_VERSIONS=$(npm info $PACKAGE_NAME versions -json)
VERSION_TO_DEPRECATE=$(echo $ALL_VERSIONS | node -e "
const versions = JSON.parse(require('fs').readFileSync('/dev/stdin', 'utf-8'));
const devVersions = versions.filter(v => v.includes('-next-beta.'));
const versionToDeprecate = devVersions[devVersions.length - 2];
console.log(versionToDeprecate);
")
echo Deprecating version $VERSION_TO_DEPRECATE
npm deprecate $PACKAGE_NAME@$VERSION_TO_DEPRECATE "Deprecated dev version."
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
Loading

0 comments on commit b921af7

Please sign in to comment.