mirror of
https://github.com/different-ai/openwork
synced 2026-04-26 01:25:10 +02:00
chore(openwrk): add npm publish skill and bump
This commit is contained in:
1
.opencode/skills/openwrk-npm-publish/.env.example
Normal file
1
.opencode/skills/openwrk-npm-publish/.env.example
Normal file
@@ -0,0 +1 @@
|
||||
NPM_TOKEN=
|
||||
1
.opencode/skills/openwrk-npm-publish/.gitignore
vendored
Normal file
1
.opencode/skills/openwrk-npm-publish/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.env
|
||||
54
.opencode/skills/openwrk-npm-publish/SKILL.md
Normal file
54
.opencode/skills/openwrk-npm-publish/SKILL.md
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
name: openwrk-npm-publish
|
||||
description: |
|
||||
Publish the openwrk npm package with clean git hygiene.
|
||||
|
||||
Triggers when user mentions:
|
||||
- "openwrk npm publish"
|
||||
- "publish openwrk"
|
||||
- "bump openwrk"
|
||||
---
|
||||
|
||||
## Quick usage (already configured)
|
||||
|
||||
1. Ensure you are on the default branch and the tree is clean.
|
||||
2. Bump the version in `packages/headless/package.json`.
|
||||
3. Commit the bump.
|
||||
4. Publish the package.
|
||||
|
||||
```bash
|
||||
pnpm --filter openwrk publish --access public
|
||||
```
|
||||
|
||||
5. Verify the published version.
|
||||
|
||||
```bash
|
||||
npm view openwrk version
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Scripted publish
|
||||
|
||||
```bash
|
||||
./.opencode/skills/openwrk-npm-publish/scripts/publish-openwrk.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## First-time setup (if not configured)
|
||||
|
||||
Authenticate with npm before publishing.
|
||||
|
||||
```bash
|
||||
npm login
|
||||
```
|
||||
|
||||
Alternatively, export an npm token in your environment (see `.env.example`).
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
|
||||
- `pnpm publish` requires a clean git tree.
|
||||
- This publish flow is separate from app release tags.
|
||||
15
.opencode/skills/openwrk-npm-publish/scripts/publish-openwrk.sh
Executable file
15
.opencode/skills/openwrk-npm-publish/scripts/publish-openwrk.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
root="$(git rev-parse --show-toplevel)"
|
||||
cd "$root"
|
||||
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "Working tree is dirty. Commit or stash before publish."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
version=$(node -p "require('./packages/headless/package.json').version")
|
||||
echo "Publishing openwrk@$version"
|
||||
|
||||
pnpm --filter openwrk publish --access public
|
||||
Reference in New Issue
Block a user