-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (44 loc) · 1.37 KB
/
type-sync.yml
File metadata and controls
54 lines (44 loc) · 1.37 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
name: Deploy type stubs to S3
on:
push:
branches:
- main
jobs:
generate-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyright
pip install pydantic==2.10.6
- name: Clean existing typings
run: rm -rf typings
- name: Generate type stubs for narada
run: |
PYTHONPATH=packages/narada-pyodide/src pyright --createstub narada
- name: Generate type stubs for narada_core
run: |
PYTHONPATH=packages/narada-core/src pyright --createstub narada_core
- name: Create zip archive
run: |
cd typings
zip -r ../typings.zip .
cd ..
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Deploy to S3
run: |
aws s3 cp ./typings.zip ${{ vars.NARADA_PYTHON_SDK_TYPE_STUBS_S3_URI }}