This repository was archived by the owner on Jun 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : compilation
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request : # TODEL
8
+ branches :
9
+ - ' **'
10
+
11
+ permissions :
12
+ contents : write
13
+
14
+ jobs :
15
+ deploy :
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+
20
+ - name : Configure Git Credentials
21
+ run : |
22
+ git config user.name github-actions[bot]
23
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
24
+
25
+ - name : Set up Python 3.12
26
+ uses : actions/setup-python@v5
27
+ with :
28
+ python-version : 3.12
29
+
30
+ - name : Install poetry
31
+ shell : bash
32
+ run : |
33
+ python -m pip install poetry
34
+ echo "$HOME/.poetry/bin" >> $GITHUB_PATH
35
+
36
+ - name : Configure poetry
37
+ shell : bash
38
+ run : poetry config virtualenvs.in-project true
39
+
40
+ - name : Set up cache
41
+ uses : actions/cache@v3
42
+ id : cache
43
+ with :
44
+ path : .venv
45
+ key : venv-compilation-${{ hashFiles('**/poetry.lock') }}
46
+
47
+ - name : Ensure cache is healthy
48
+ if : steps.cache.outputs.cache-hit == 'true'
49
+ shell : bash
50
+ run : poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
51
+
52
+ - name : Install dependencies
53
+ shell : bash
54
+ run : poetry install
55
+
56
+ - name : Compile proto files
57
+ shell : bash
58
+ run : poetry run poe generate
59
+
60
+ - name : Publish the compiled files
61
+ shell : bash
62
+ run : |
63
+ git checkout --orphan compiled-test-files
64
+ cp tests/output_betterproto tests_betterproto
65
+ cp tests/output_betterproto_pydantic tests_betterproto_pydantic
66
+ cp tests/output_reference tests_reference
67
+ git add tests_betterproto tests_betterproto_pydantic tests_reference
68
+ git commit -m "Add compilation output"
69
+ git push --force origin compiled-test-files
You can’t perform that action at this time.
0 commit comments