55 tags :
66 - " v*"
77
8+ permissions :
9+ id-token : write
10+ contents : write
11+
812jobs :
9- publish :
13+ build_wheels :
14+ name : Build wheels on ${{ matrix.os }}
15+ runs-on : ${{ matrix.os }}
16+ strategy :
17+ matrix :
18+ os : [ubuntu-latest, macos-latest, windows-latest]
19+
20+ steps :
21+ - name : Checkout pywire
22+ uses : actions/checkout@v4
23+ with :
24+ path : pywire
25+ fetch-depth : 0
26+ submodules : recursive
27+
28+ - name : Update tree-sitter-pywire submodule (Latest Tag)
29+ working-directory : pywire/tree-sitter-pywire
30+ run : |
31+ git fetch --tags
32+ LATEST_TAG=$(git tag -l "v*" --sort=-v:refname | head -n 1)
33+ echo "Checking out $LATEST_TAG"
34+ git checkout $LATEST_TAG
35+
36+ - name : Install pnpm
37+ uses : pnpm/action-setup@v2
38+ with :
39+ version : 9
40+
41+ - name : Setup Node.js
42+ uses : actions/setup-node@v4
43+ with :
44+ node-version : ' 20'
45+ cache : ' pnpm'
46+ cache-dependency-path : ' pywire/src/pywire/client/pnpm-lock.yaml'
47+
48+ - name : Build client bundle
49+ working-directory : pywire
50+ run : |
51+ cd src/pywire/client
52+ pnpm install --frozen-lockfile
53+ pnpm build
54+
55+ - name : Build wheels
56+ uses : pypa/cibuildwheel@v2.22.0
57+ env :
58+ CIBW_SKIP : " cp37-* cp38-* cp39-* cp310-*"
59+ CIBW_ARCHS : " auto64"
60+ CIBW_BUILD_FRONTEND : " build"
61+ with :
62+ package-dir : pywire
63+ output-dir : wheelhouse
64+
65+ - uses : actions/upload-artifact@v4
66+ with :
67+ name : cibw-wheels-${{ matrix.os }}
68+ path : ./wheelhouse/*.whl
69+
70+ build_sdist :
71+ name : Build sdist
1072 runs-on : ubuntu-latest
11- environment : release
12- permissions :
13- id-token : write
14- contents : write
1573 steps :
1674 - name : Checkout pywire
1775 uses : actions/checkout@v4
2482 working-directory : pywire/tree-sitter-pywire
2583 run : |
2684 git fetch --tags
27- # Get latest tag (v*) sorted by version
2885 LATEST_TAG=$(git tag -l "v*" --sort=-v:refname | head -n 1)
2986 echo "Checking out $LATEST_TAG"
3087 git checkout $LATEST_TAG
@@ -41,16 +98,41 @@ jobs:
4198 cache : ' pnpm'
4299 cache-dependency-path : ' pywire/src/pywire/client/pnpm-lock.yaml'
43100
101+ - name : Build client bundle
102+ working-directory : pywire
103+ run : |
104+ cd src/pywire/client
105+ pnpm install --frozen-lockfile
106+ pnpm build
107+
44108 - name : Install uv
45109 uses : astral-sh/setup-uv@v5
46- with :
47- enable-cache : true
48110
49- - name : Build
50- run : uv build
111+ - name : Build sdist
112+ run : uv build --sdist
51113 working-directory : pywire
52114
115+ - uses : actions/upload-artifact@v4
116+ with :
117+ name : cibw-sdist
118+ path : pywire/dist/*.tar.gz
119+
120+ publish :
121+ name : Publish
122+ needs : [build_wheels, build_sdist]
123+ runs-on : ubuntu-latest
124+ environment : release
125+ permissions :
126+ id-token : write
127+ contents : write
128+ steps :
129+ - uses : actions/download-artifact@v4
130+ with :
131+ pattern : cibw-*
132+ path : dist
133+ merge-multiple : true
134+
53135 - name : Publish
54136 uses : pypa/gh-action-pypi-publish@release/v1
55137 with :
56- packages-dir : pywire/ dist/
138+ packages-dir : dist/
0 commit comments