mirror of
https://github.com/NocturnLabs/opencode-personal-knowledge.git
synced 2026-06-02 06:03:47 +02:00
👷 ci: enable content write permissions and add automated version bumping
This commit enhances the npm publish workflow to include automated version bumping and updates necessary permissions and configurations. Changes: - Added contents: write permission to allow pushing version bump commits - Configured git user for automated commits - Added npm version patch step to automatically increment patch version - Added commit and push steps for version changes - Updated version numbers in package.json and src/index.ts - Added token configuration for checkout step for enhanced security
This commit is contained in:
@@ -5,17 +5,18 @@ on:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "src/**"
|
||||
- "package.json"
|
||||
|
||||
permissions:
|
||||
id-token: write # ← Required for OIDC
|
||||
contents: read
|
||||
id-token: write # Required for OIDC
|
||||
contents: write # Required to push version bump commit
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
@@ -29,6 +30,20 @@ jobs:
|
||||
- name: Ensure latest npm
|
||||
run: npm install -g npm@latest
|
||||
|
||||
- name: Configure git
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Bump version
|
||||
run: npm version patch --no-git-tag-version
|
||||
|
||||
- name: Commit version bump
|
||||
run: |
|
||||
git add package.json
|
||||
git commit -m "chore: bump version to $(node -p "require('./package.json').version")" || echo "No changes to commit"
|
||||
git push
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "opencode-personal-knowledge",
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.8",
|
||||
"description": "Personal knowledge MCP server with vector database for the Opencode ecosystem",
|
||||
"type": "module",
|
||||
"main": "dist/mcp-server.js",
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ const program = new Command();
|
||||
program
|
||||
.name("pk")
|
||||
.description("Personal Knowledge CLI - Manage your knowledge base")
|
||||
.version("1.0.1");
|
||||
.version("1.0.2");
|
||||
|
||||
// Add command
|
||||
program
|
||||
|
||||
Reference in New Issue
Block a user