Skip to content

Fastest way to scaffold your LLM powered personal knowledge base - Obsidian, Claude Code, qmd, Github

chore: merge release+publish into single workflow, rename to release-publish.yml

jessepinkman990010a3c85bfa75
diff --git a/.claude/skills/release/SKILL.md b/.claude/skills/release/SKILL.md
index 600b231..99c7f82 100644
--- a/.claude/skills/release/SKILL.md
+++ b/.claude/skills/release/SKILL.md
@@ -159,8 +159,7 @@ After the PR is created, tell the user:
> **PR opened:** [url]
>
> **Pipeline after merge:**
-> 1. `create-release.yml` creates tag `vX.Y.Z` and a GitHub Release
-> 2. `publish-npm.yml` publishes `[email protected]` to npm
+> 1. `release-publish.yml` creates tag `vX.Y.Z`, a GitHub Release, and publishes `[email protected]` to npm
>
> **To verify after merge:** https://www.npmjs.com/package/obsidian-agent-wiki
diff --git a/.github/workflows/pack-test.yml b/.github/workflows/pack-test.yml
new file mode 100644
index 0000000..519871a
--- /dev/null
+++ b/.github/workflows/pack-test.yml
@@ -0,0 +1,83 @@
+name: Pack Test
+
+on:
+ pull_request:
+ branches:
+ - main
+
+permissions:
+ contents: read
+
+jobs:
+ pack-test:
+ name: Pack and scaffold test
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+
+ - name: Pack
+ run: npm pack
+
+ - name: Scaffold via npx
+ run: |
+ VERSION=$(node -p "require('./package.json').version")
+ npx -y "obsidian-agent-wiki-${VERSION}.tgz" test-vault
+
+ - name: Verify scaffold
+ run: |
+ set -e
+ fail=0
+
+ check() {
+ local label="$1"
+ local path="$2"
+ if [ -e "$path" ]; then
+ echo "PASS: $label"
+ else
+ echo "FAIL: $label — $path not found"
+ fail=1
+ fi
+ }
+
+ check ".gitignore (not .gitignore.template)" test-vault/.gitignore
+ check "wiki/index.md" test-vault/wiki/index.md
+ check "wiki/log.md" test-vault/wiki/log.md
+ check "wiki/overview.md" test-vault/wiki/overview.md
+ check "wiki/sources/" test-vault/wiki/sources
+ check "wiki/qa/" test-vault/wiki/qa
+ check "sources/articles/" test-vault/sources/articles
+ check "sources/pdfs/" test-vault/sources/pdfs
+ check "sources/personal/" test-vault/sources/personal
+ check ".claude/skills/setup" test-vault/.claude/skills/setup
+ check ".claude/skills/ingest" test-vault/.claude/skills/ingest
+ check ".claude/skills/query" test-vault/.claude/skills/query
+ check ".claude/skills/lint" test-vault/.claude/skills/lint
+ check ".claude/skills/qmd-cli" test-vault/.claude/skills/qmd-cli
+ check "scripts/qmd/setup.ts" test-vault/scripts/qmd/setup.ts
+ check "scripts/qmd/reindex.ts" test-vault/scripts/qmd/reindex.ts
+ check "scripts/qmd/package.json" test-vault/scripts/qmd/package.json
+ check "CLAUDE.md" test-vault/CLAUDE.md
+ check "mise.toml" test-vault/mise.toml
+
+ if [ "$fail" -ne 0 ]; then
+ echo ""
+ echo "One or more checks failed."
+ exit 1
+ fi
+
+ echo ""
+ echo "All checks passed."
+
+ - name: Clean up
+ if: always()
+ run: |
+ rm -rf test-vault
+ VERSION=$(node -p "require('./package.json').version")
+ rm -f "obsidian-agent-wiki-${VERSION}.tgz"
diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml
deleted file mode 100644
index a01b172..0000000
--- a/.github/workflows/publish-npm.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-name: Publish to npm
-
-on:
- release:
- types:
- - published
-
-permissions:
- contents: read
-
-jobs:
- publish:
- name: Publish obsidian-agent-wiki to npm
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout release tag
- uses: actions/checkout@v4
- with:
- ref: ${{ github.ref }}
-
- - name: Set up Node.js with npm registry auth
- uses: actions/setup-node@v4
- with:
- node-version: '20'
- registry-url: 'https://registry.npmjs.org'
-
- - name: Publish to npm
- run: npm publish --access public
- env:
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/create-release.yml b/.github/workflows/release-publish.yml
similarity index 70%
rename from .github/workflows/create-release.yml
rename to .github/workflows/release-publish.yml
index 489ae90..e12c08e 100644
--- a/.github/workflows/create-release.yml
+++ b/.github/workflows/release-publish.yml
@@ -1,4 +1,4 @@
-name: Create Release
+name: Release and Publish
on:
push:
@@ -10,7 +10,7 @@ permissions:
jobs:
release:
- name: Create GitHub Release
+ name: Create GitHub Release and Publish to npm
runs-on: ubuntu-latest
steps:
@@ -37,6 +37,13 @@ jobs:
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
+ - name: Set up Node.js with npm registry auth
+ if: steps.check.outputs.exists == 'false'
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+ registry-url: 'https://registry.npmjs.org'
+
- name: Create tag and release
if: steps.check.outputs.exists == 'false'
env:
@@ -46,3 +53,9 @@ jobs:
--title "v${{ steps.version.outputs.version }}" \
--generate-notes \
--latest
+
+ - name: Publish to npm
+ if: steps.check.outputs.exists == 'false'
+ run: npm publish --access public
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}