Skip to content

Commit 090532f

Browse files
committed
feat(ci): auto-create github releases and add workflow permissions
1 parent 56bc809 commit 090532f

File tree

7 files changed

+48
-0
lines changed

7 files changed

+48
-0
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ concurrency:
1010
group: ci-${{ github.ref }}
1111
cancel-in-progress: false
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
test-build:
1518
name: Test and Build
@@ -278,3 +281,30 @@ jobs:
278281
if: needs.check-docs-changes.outputs.docs_changed == 'true'
279282
uses: ./.github/workflows/docs-embeddings.yml
280283
secrets: inherit
284+
285+
# Create GitHub Release (only for version commits on main, after all builds complete)
286+
create-release:
287+
name: Create GitHub Release
288+
runs-on: blacksmith-4vcpu-ubuntu-2404
289+
needs: [create-ghcr-manifests, detect-version]
290+
if: needs.detect-version.outputs.is_release == 'true'
291+
permissions:
292+
contents: write
293+
steps:
294+
- name: Checkout code
295+
uses: actions/checkout@v4
296+
with:
297+
fetch-depth: 0
298+
299+
- name: Setup Bun
300+
uses: oven-sh/setup-bun@v2
301+
with:
302+
bun-version: latest
303+
304+
- name: Install dependencies
305+
run: bun install --frozen-lockfile
306+
307+
- name: Create release
308+
env:
309+
GH_PAT: ${{ secrets.GITHUB_TOKEN }}
310+
run: bun run scripts/create-single-release.ts ${{ needs.detect-version.outputs.version }}

.github/workflows/docs-embeddings.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
workflow_call:
55
workflow_dispatch: # Allow manual triggering
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
process-docs-embeddings:
912
name: Process Documentation Embeddings

.github/workflows/migrations.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
workflow_call:
55
workflow_dispatch:
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
migrate:
912
name: Apply Database Migrations

.github/workflows/publish-cli.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
paths:
77
- 'packages/cli/**'
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
publish-npm:
1114
runs-on: blacksmith-4vcpu-ubuntu-2404

.github/workflows/publish-python-sdk.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
paths:
77
- 'packages/python-sdk/**'
88

9+
permissions:
10+
contents: write
11+
912
jobs:
1013
publish-pypi:
1114
runs-on: blacksmith-4vcpu-ubuntu-2404

.github/workflows/publish-ts-sdk.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
paths:
77
- 'packages/ts-sdk/**'
88

9+
permissions:
10+
contents: write
11+
912
jobs:
1013
publish-npm:
1114
runs-on: blacksmith-4vcpu-ubuntu-2404

.github/workflows/test-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
workflow_call:
55
workflow_dispatch:
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
test-build:
912
name: Test and Build

0 commit comments

Comments
 (0)