-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (102 loc) · 3.43 KB
/
Copy pathrelease.yml
File metadata and controls
120 lines (102 loc) · 3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: release
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v5
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: packages/openclaw-dory/package-lock.json
- name: Sync dependencies
run: uv sync --frozen --all-groups
- name: Run lint
run: uv run ruff check .
- name: Run tests
run: uv run pytest -q
- name: Build OpenClaw plugin
working-directory: packages/openclaw-dory
run: |
npm ci
npm run build
- name: Build package
run: uv build --wheel --sdist
- name: Build Docker image
run: docker build -t dory:release-validate .
- name: Validate public eval suite
run: uv run python eval/validate.py
- name: Public safety scan
run: |
uv run python scripts/release/check-public-safety.py \
--path README.md \
--path AGENTS.md \
--path CLAUDE.md \
--path CONTRIBUTING.md \
--path CODE_OF_CONDUCT.md \
--path SECURITY.md \
--path .github/pull_request_template.md \
--path .github/ISSUE_TEMPLATE \
--path eval/README.md \
--path eval/INDEX.md \
--path eval/categories.md \
--path eval/public \
--path examples/corpus \
--path docs/agent-integration.md \
--path docs/evals/README.md \
--path docs/current-state/README.md \
--path docs/current-state/operations-and-validation.md \
--path references/runbook.md \
--path references/client-runbook.md \
--path LICENSE \
--path pyproject.toml
- name: Built artifact safety scan
run: uv run python scripts/release/check-public-safety.py --path dist
build-and-publish:
needs: validate
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract image metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/doryd
tags: |
type=ref,event=tag
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=raw,value=manual-${{ github.run_number }},enable=${{ github.event_name == 'workflow_dispatch' }}
type=sha,format=short
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max