Skip to content

Commit 4974e6f

Browse files
sheeki03claude
andcommitted
ci: add Docker build to release pipeline, drop PyPI
- Add Docker job: builds and pushes to ghcr.io on release - Tags: latest + version (e.g., ghcr.io/sheeki03/schrute:0.1.0) - Uses GitHub Actions cache for layer reuse - Remove PyPI publish job (deferred for now) - Release job now waits on docker build before creating release Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d1f4ae1 commit 4974e6f

1 file changed

Lines changed: 37 additions & 16 deletions

File tree

.github/workflows/release.yml

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
permissions:
99
contents: write
10+
packages: write
1011

1112
jobs:
1213
# ─── npm publish ─────────────────────────────────────────────────
@@ -24,6 +25,41 @@ jobs:
2425
env:
2526
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2627

28+
# ─── Docker → GitHub Container Registry ────────────────────────
29+
docker:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-node@v4
34+
with:
35+
node-version: 22
36+
- run: npm ci
37+
- run: npm run build
38+
39+
- uses: docker/setup-buildx-action@v3
40+
41+
- uses: docker/login-action@v3
42+
with:
43+
registry: ghcr.io
44+
username: ${{ github.actor }}
45+
password: ${{ secrets.GITHUB_TOKEN }}
46+
47+
- name: Extract version from tag
48+
id: version
49+
env:
50+
TAG_NAME: ${{ github.ref_name }}
51+
run: echo "version=${TAG_NAME#v}" >> "$GITHUB_OUTPUT"
52+
53+
- uses: docker/build-push-action@v6
54+
with:
55+
context: .
56+
push: true
57+
tags: |
58+
ghcr.io/${{ github.repository }}:latest
59+
ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }}
60+
cache-from: type=gha
61+
cache-to: type=gha,mode=max
62+
2763
# ─── Standalone binaries → GitHub Releases ───────────────────────
2864
binary:
2965
strategy:
@@ -61,7 +97,7 @@ jobs:
6197

6298
# ─── Create GitHub Release with binaries ─────────────────────────
6399
release:
64-
needs: [npm, binary]
100+
needs: [npm, binary, docker]
65101
runs-on: ubuntu-latest
66102
steps:
67103
- uses: actions/download-artifact@v4
@@ -76,21 +112,6 @@ jobs:
76112
env:
77113
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78114

79-
# ─── Python SDK → PyPI via uv ───────────────────────────────────
80-
pypi:
81-
needs: [npm]
82-
runs-on: ubuntu-latest
83-
steps:
84-
- uses: actions/checkout@v4
85-
- uses: astral-sh/setup-uv@v4
86-
- name: Build and publish Python SDK
87-
working-directory: src/client/python
88-
run: |
89-
uv build
90-
uv publish
91-
env:
92-
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
93-
94115
# ─── Homebrew tap update ─────────────────────────────────────────
95116
homebrew:
96117
needs: [npm]

0 commit comments

Comments
 (0)