-
Notifications
You must be signed in to change notification settings - Fork 1
163 lines (144 loc) · 4.06 KB
/
Copy pathrelease.yml
File metadata and controls
163 lines (144 loc) · 4.06 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.12"]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -e ".[dev,crypto]"
- name: Lint
run: python -m ruff check src/ tests/
- name: Type check
run: python -m mypy src/agentegrity
- name: Test
run: python -m pytest tests/ -v
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Install build tooling
run: pip install --upgrade build twine
- name: Build sdist and wheel
run: python -m build
- name: Validate long description
run: python -m twine check dist/*
- name: Upload dist artifacts
uses: actions/upload-artifact@v7
with:
name: dist
path: dist/
publish-testpypi:
needs: build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/project/agentegrity/
permissions:
id-token: write
steps:
- name: Download dist artifacts
uses: actions/download-artifact@v8
with:
name: dist
path: dist/
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
publish-pypi:
needs: publish-testpypi
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/agentegrity/
permissions:
id-token: write
steps:
- name: Download dist artifacts
uses: actions/download-artifact@v8
with:
name: dist
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
build-npm:
needs: publish-pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.10"
- uses: actions/setup-node@v6
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Install workspace
run: bun install --frozen-lockfile
working-directory: clients/typescript
- name: Verify version parity
run: bun run check-versions
working-directory: clients/typescript
- name: Build @agentegrity/client first
run: bun run --filter @agentegrity/client build
working-directory: clients/typescript
- name: Build all packages
run: bun run build
working-directory: clients/typescript
- name: Test all packages
run: bun run test
working-directory: clients/typescript
- name: Upload workspace artifact
uses: actions/upload-artifact@v7
with:
name: ts-workspace
path: clients/typescript/
publish-npm:
needs: build-npm
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- client
- claude-sdk
- langchain
- openai-agents
- crewai
- google-adk
- vercel-ai
environment:
name: npm
url: https://www.npmjs.com/package/@agentegrity/${{ matrix.package }}
permissions:
contents: read
id-token: write
steps:
- name: Download workspace artifact
uses: actions/download-artifact@v8
with:
name: ts-workspace
path: clients/typescript/
- uses: actions/setup-node@v6
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Publish @agentegrity/${{ matrix.package }}
run: npm publish --access public
working-directory: clients/typescript/packages/${{ matrix.package }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}