Treasury & Bank Transfer Management System — سامانه مدیریت خزانه‌داری و حواله‌های بانکی

1 name: Temporary TreasuryFlow EXE Transfer
2 on:
3 push:
4 branches:
5 - transfer-exe-to-drive-20261006
6
7 permissions:
8 contents: read
9
10 jobs:
11 transfer:
12 runs-on: ubuntu-latest
13 timeout-minutes: 60
14 steps:
15 - name: Wait for release asset upload
16 shell: bash
17 env:
18 GH_TOKEN: ${{ github.token }}
19 ASSET_ID: "614671355"
20 run: |
21 set -euo pipefail
22 for i in $(seq 1 120); do
23 state=$(curl -fsSL \
24 -H "Authorization: Bearer $GH_TOKEN" \
25 -H "Accept: application/vnd.github+json" \
26 "https://api.github.com/repos/${{ github.repository }}/releases/assets/$ASSET_ID" | jq -r '.state')
27 echo "asset state: $state"
28 if [ "$state" = "uploaded" ]; then
29 exit 0
30 fi
31 sleep 30
32 done
33 echo "Asset did not reach uploaded state in time" >&2
34 exit 1
35
36 - name: Download private release asset
37 shell: bash
38 env:
39 GH_TOKEN: ${{ github.token }}
40 ASSET_ID: "614671355"
41 run: |
42 set -euo pipefail
43 curl -fL \
44 -H "Authorization: Bearer $GH_TOKEN" \
45 -H "Accept: application/octet-stream" \
46 "https://api.github.com/repos/${{ github.repository }}/releases/assets/$ASSET_ID" \
47 -o TreasuryFlow-0.1.0-Windows-x64.exe
48 test "$(stat -c%s TreasuryFlow-0.1.0-Windows-x64.exe)" -gt 100000000
49
50 - name: Upload transfer artifact
51 uses: actions/upload-artifact@v4
52 with:
53 name: treasuryflow-exe-transfer
54 path: TreasuryFlow-0.1.0-Windows-x64.exe
55 compression-level: 0
56 retention-days: 1