فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
CI: build, test, and publish Windows 2.0.0 installer from release tag
davoodmehraban89 committed
Oct 11, 2026 at 00:09 UTC
fba3c18001fa9025d497cce6239a1fbccd504a51
1 file changed
+52
.github/workflows/release-v2.yml
new
+52
@@ -0,0 +1,52 @@
1
+name: Build and publish Factor-easyPro v2.0.0
2
+on:
3
+ push:
4
+ branches: [main]
5
+ paths:
6
+ - '.github/workflows/release-v2.yml'
7
+permissions:
8
+ contents: write
9
+jobs:
10
+ windows-release:
11
+ runs-on: windows-latest
12
+ timeout-minutes: 50
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ ref: v2.0.0
17
+ persist-credentials: false
18
+ - uses: actions/setup-node@v4
19
+ with:
20
+ node-version: '22'
21
+ cache: npm
22
+ - uses: dtolnay/rust-toolchain@stable
23
+ - name: Install JavaScript dependencies
24
+ run: npm ci
25
+ - name: Automated tests
26
+ run: npm test
27
+ - name: Build native Windows installer
28
+ run: npm exec tauri build
29
+ - name: Generate independent installer checksum
30
+ shell: pwsh
31
+ run: |
32
+ $installer = Get-ChildItem 'src-tauri/target/release/bundle/nsis/*2.0.0*x64-setup.exe' | Select-Object -First 1
33
+ if (!$installer) { throw 'Windows installer missing' }
34
+ $hash = (Get-FileHash $installer.FullName -Algorithm SHA256).Hash
35
+ $hash + ' ' + $installer.Name | Out-File -FilePath SHA256SUMS.txt -Encoding ascii
36
+ Write-Output ('SHA256=' + $hash)
37
+ - name: Publish GitHub release
38
+ shell: pwsh
39
+ env:
40
+ GH_TOKEN: '${{ github.token }}'
41
+ run: |
42
+ gh release view v2.0.0 --json id *> $null
43
+ if ($LASTEXITCODE -ne 0) {
44
+ gh release create v2.0.0 --draft --title 'Factor-easyPro 2.0.0 — Windows x64' --notes-file RELEASE_NOTES_FA.md
45
+ if ($LASTEXITCODE -ne 0) { throw 'Cannot create draft release' }
46
+ }
47
+ gh release upload v2.0.0 'src-tauri/target/release/bundle/nsis/Factor-easyPro_2.0.0_x64-setup.exe' SHA256SUMS.txt --clobber
48
+ if ($LASTEXITCODE -ne 0) { throw 'Release assets upload failed' }
49
+ gh release edit v2.0.0 --draft=false --latest
50
+ if ($LASTEXITCODE -ne 0) { throw 'Could not publish release' }
51
+ gh release view v2.0.0 --json url,isDraft,assets
52
+ if ($LASTEXITCODE -ne 0) { throw 'Release verification failed' }