feat(ci): Add CI/CD publishing CLI commands, configuration defaults, and npm/PyPI workflow templates

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Lilith 2026-03-08 19:39:00 -07:00
parent 65da8b2030
commit c8fcbfe9bc
10 changed files with 24 additions and 24 deletions

View file

@ -7,8 +7,8 @@ Named "bitch" because these are the tedious bitch-work tasks that need automatio
## Installation
```bash
# Install globally from forge.nasty.sh
npm install -g @lilith/bitch --registry=http://forge.nasty.sh/api/packages/lilith/npm/
# Install globally from forge.black.local
npm install -g @lilith/bitch --registry=http://forge.black.local/api/packages/lilith/npm/
# Or with .npmrc configured
npm install -g @lilith/bitch
@ -188,8 +188,8 @@ bitch commits uninstall
### Registry
Packages are published to and checked against:
- **NPM**: `http://forge.nasty.sh/api/packages/lilith/npm/`
- **PyPI**: `http://forge.nasty.sh/api/packages/lilith/pypi/`
- **NPM**: `http://forge.black.local/api/packages/lilith/npm/`
- **PyPI**: `http://forge.black.local/api/packages/lilith/pypi/`
### Package Detection

View file

@ -4,7 +4,7 @@
set -euo pipefail
REGISTRY="http://forge.nasty.sh/api/packages/lilith/npm/"
REGISTRY="http://forge.black.local/api/packages/lilith/npm/"
PACKAGE="@lilith/bitch"
echo "Installing $PACKAGE globally..."

View file

@ -105,7 +105,7 @@ export function createCICommand(): Command {
for (const fail of failures) {
console.log(colors.error(`${fail.repo}`))
if (fail.lastRun) {
const url = `https://forge.nasty.sh/lilith/${fail.repo}/actions`
const url = `http://forge.black.local/lilith/${fail.repo}/actions`
console.log(` ${colors.dim(url)}`)
}
console.log()

View file

@ -11,11 +11,11 @@ interface ServiceCheck {
}
const ENDPOINTS = {
verdaccioPing: 'http://npm.nasty.sh/-/ping',
verdaccioHealth: 'http://npm.nasty.sh/-/verdaccio/data/packages',
forgejoHealth: 'http://forge.nasty.sh/api/v1/version',
forgejoPackages: 'http://forge.nasty.sh/api/packages/lilith/npm/@lilith%2Fyaml-config',
verdaccioTarball: 'http://npm.nasty.sh/@lilith/yaml-config/-/yaml-config-1.0.9.tgz',
verdaccioPing: 'http://npm.black.local/-/ping',
verdaccioHealth: 'http://npm.black.local/-/verdaccio/data/packages',
forgejoHealth: 'http://forge.black.local/api/v1/version',
forgejoPackages: 'http://forge.black.local/api/packages/lilith/npm/@lilith%2Fyaml-config',
verdaccioTarball: 'http://npm.black.local/@lilith/yaml-config/-/yaml-config-1.0.9.tgz',
}
async function checkVerdaccioPing(): Promise<ServiceCheck> {
@ -188,7 +188,7 @@ function formatRow(check: ServiceCheck): string[] {
export function createDevopsCommand(): Command {
return new Command('devops')
.description('Check status of devops services (npm.nasty.sh, forge.nasty.sh)')
.description('Check status of devops services (npm.black.local, forge.black.local)')
.option('-v, --verbose', 'Show detailed information')
.action(async (options: { verbose?: boolean }) => {
const spinner = ora('Checking devops services...').start()

View file

@ -45,7 +45,7 @@ const TEMPLATES: Record<PackageType, {
typescript: '^5.3.0',
},
publishConfig: {
registry: 'http://forge.nasty.sh/api/packages/lilith/npm/',
registry: 'http://forge.black.local/api/packages/lilith/npm/',
},
_: {
publish: true,
@ -93,7 +93,7 @@ const TEMPLATES: Record<PackageType, {
typescript: '^5.3.0',
},
publishConfig: {
registry: 'http://forge.nasty.sh/api/packages/lilith/npm/',
registry: 'http://forge.black.local/api/packages/lilith/npm/',
},
_: {
publish: true,
@ -141,7 +141,7 @@ export class {{Name}}Module {}
typescript: '^5.3.0',
},
publishConfig: {
registry: 'http://forge.nasty.sh/api/packages/lilith/npm/',
registry: 'http://forge.black.local/api/packages/lilith/npm/',
},
_: {
publish: true,
@ -284,7 +284,7 @@ __pycache__/
await writeFile(
join(packagePath, '.npmrc'),
'@lilith:registry=http://forge.nasty.sh/api/packages/lilith/npm/\n'
'@lilith:registry=http://forge.black.local/api/packages/lilith/npm/\n'
)
// Initialize git

View file

@ -6,12 +6,12 @@ export const CONFIG_FILE = join(CONFIG_DIR, 'cli.yaml')
export const DEFAULT_CONFIG = {
registries: {
npm: 'http://forge.nasty.sh/api/packages/lilith/npm/',
pypi: 'http://forge.nasty.sh/api/packages/lilith/pypi/',
npm: 'http://forge.black.local/api/packages/lilith/npm/',
pypi: 'http://forge.black.local/api/packages/lilith/pypi/',
},
forgejo: {
url: 'https://forge.nasty.sh',
api: 'https://forge.nasty.sh/api/v1',
url: 'http://forge.black.local',
api: 'http://forge.black.local/api/v1',
},
workspaces: [
join(homedir(), 'Code/@packages'),

View file

@ -53,7 +53,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'http://forge.nasty.sh/api/packages/lilith/npm/'
registry-url: 'http://forge.black.local/api/packages/lilith/npm/'
- name: Setup pnpm
uses: pnpm/action-setup@v2

View file

@ -39,7 +39,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'http://forge.nasty.sh/api/packages/lilith/npm/'
registry-url: 'http://forge.black.local/api/packages/lilith/npm/'
- name: Publish
run: npm publish --access public

View file

@ -47,7 +47,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'http://forge.nasty.sh/api/packages/lilith/npm/'
registry-url: 'http://forge.black.local/api/packages/lilith/npm/'
- name: Setup pnpm
uses: pnpm/action-setup@v2

View file

@ -32,7 +32,7 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m twine upload \
--repository-url https://forge.nasty.sh/api/packages/lilith/pypi \
--repository-url http://forge.black.local/api/packages/lilith/pypi \
--skip-existing \
--non-interactive \
dist/*