فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
ci(A07): vendor pinned offline assets and verify packaging before commit
davoodmehraban89 committed
Oct 15, 2026 at 20:42 UTC
398f698290bdf386dc0db168511da79d688b5aff
1 file changed
+53
.github/workflows/a07-vendor-assets.yml
new
+53
@@ -0,0 +1,53 @@
1
+name: Prepare vendored offline assets (single use)
2
+on:
3
+ push:
4
+ branches: ['fix/a07-offline-bundled-assets']
5
+ paths:
6
+ - '.github/workflows/a07-vendor-assets.yml'
7
+permissions:
8
+ contents: write
9
+jobs:
10
+ vendor:
11
+ runs-on: ubuntu-latest
12
+ timeout-minutes: 20
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ persist-credentials: true
17
+ - uses: actions/setup-node@v4
18
+ with:
19
+ node-version: '22'
20
+ cache: npm
21
+ - name: Install locked existing project dependencies
22
+ run: npm ci
23
+ - name: Vendor the official SheetJS 0.20.3 tarball from upstream
24
+ shell: bash
25
+ run: |
26
+ set -euo pipefail
27
+ mkdir -p vendor
28
+ curl -fL --retry 3 --connect-timeout 15 --max-time 120 \
29
+ https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz \
30
+ -o vendor/xlsx-0.20.3.tgz
31
+ test "$(wc -c < vendor/xlsx-0.20.3.tgz)" -gt 100000
32
+ (cd vendor && sha256sum xlsx-0.20.3.tgz > SHA256SUMS.txt)
33
+ - name: Install local SheetJS and pinned self-hosted Persian font
34
+ shell: bash
35
+ run: |
36
+ npm install --save-exact ./vendor/xlsx-0.20.3.tgz
37
+ npm install --save-exact @fontsource/vazirmatn@5.3.0
38
+ npm ci
39
+ - name: Verify offline Excel and existing accounting regressions
40
+ run: npm test
41
+ - name: Verify packaged fonts and frontend
42
+ run: npm run build
43
+ - name: Verify production dependency audit
44
+ run: npm audit --omit=dev --audit-level=high
45
+ - name: Commit pinned vendored assets and dependency lock
46
+ shell: bash
47
+ run: |
48
+ set -euo pipefail
49
+ git config user.name 'github-actions[bot]'
50
+ git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
51
+ git add package.json package-lock.json vendor/xlsx-0.20.3.tgz vendor/SHA256SUMS.txt
52
+ git commit -m 'build(A07): vendor offline SheetJS and Vazirmatn dependencies'
53
+ git push origin HEAD:fix/a07-offline-bundled-assets